In 2000, Martínez was defeated in the Democratic primary by liberal State Senator Hilda Solis 62% to 29%. She charged that he was out of touch with his district when he voted to ban partial-birth abortion and opposed gun control. (He was both Roman Catholic and a member of the National Rifle Association.) While he had been a reliably Democratic vote on most issues throughout his congressional career, after his primary loss Martínez began to vote overwhelmingly with Republicans. On July 27, 2000, Martínez switched to the Republican Party, arguing that the Democrats had abandoned him. There was no Republican candidate on the ballot in the district for the 2000 election, and Martínez declined to attempt a write-in candidacy, though he remained critical of Solis and promised to stay active in the Republican party. His term in Congress ended on January 3, 2001, at the end of the 106th Congress.