Sen. John Cornyn (R-Tex.), the Senate majority whip, talks with reporters on Capitol Hill this month. (Jacquelyn Martin/AP)

Sen. John Cornyn (R-Tex.) removed himself from consideration to be the next FBI director Tuesday, becoming the latest high-profile possibility to bow out.

The second-ranking Republican senator announced his decision following two days of resistance from his Republican colleagues to the idea of him filling the post.

“Now more than ever the country needs a well-credentialed, independent FBI Director. I’ve informed the Administration that I’m committed to helping them find such an individual, and that the best way I can serve is continuing to fight for a conservative agenda in the U.S. Senate,” Cornyn said in a statement.

Cornyn’s announcement came a day after Rep. Trey Gowdy (R-S.C.) took himself out of the running. The Texas senator also released the statement not long after reports that Judge Merrick Garland, who some Republicans had touted for the job, is not interested.

(Victoria Walker,Monica Akhtar/The Washington Post)

Cornyn met with top Justice Department officials over the weekend about filling the job. Among those who did not want Cornyn to leave the Senate was Majority Leader Mitch McConnell (R-Ky.). While Cornyn is well-liked on Capitol Hill, he is seen as a partisan whose confirmation hearing would have been expected to be highly contentious.

Cornyn is close to Attorney General Jeff Sessions from their days as colleagues in the upper chamber of Congress. One Republican familiar with Cornyn’s thinking, who spoke on the condition of anonymity, said Cornyn felt obligated to consider the job because Sessions asked him to, as well as out of a desire to restore stability at the FBI and Justice Department.

McConnell said Tuesday that he told President Trump that he ought to pick Garland, whose nomination to the Supreme Court by President Barack Obama was blocked by Senate Republicans. But Garland has no interest in the job, according to associates.

Still, the top Senate Republican leader said he remained “optimistic” that Trump would pick someone in the mold of Garland.

“That illustrates the kind of person I hope and expect will come next,” McConnell said. “Somebody deeply credentialed in criminal justice and criminal justice enforcement, completely apolitical, in line with the tradition of prior FBI directors.”

At least eight candidates, including Cornyn, interviewed for the position over the weekend.

The opening was created when Trump fired James B. Comey. Shifting explanations by Trump and his aides about why Comey was fired have prompted concerns by Democrats and some Republicans.

Comey had been leading an investigation into alleged Russian meddling in last year’s presidential election, including possible ties between Trump associates and Russian officials.

Democrats are expected to raise fierce concerns about any nominee seen as a partisan defender of Trump, and Senate Republican leaders are hoping to avoid such a conflict.

Garland, the chief judge of the U.S. Court of Appeals for the D.C. Circuit, had been promoted for the job by some of the same Senate Republicans who blocked his nomination and refused to give him a Senate hearing.

He has declined to comment on the reports, but friends contacted reporters Tuesday to say speculation about Garland was groundless.

“He loves his job and is not interested in leaving the judiciary,” said one, who spoke on the condition of anonymity.

Some Democrats seethed that Republicans were promoting Garland for the FBI job after refusing to act on his Supreme Court nomination. They said sudden interest was a GOP strategy to open a seat on the circuit court for a Trump administration nominee. Federal judges have lifetime appointments.