The lengthy roster of potential candidates to replace ousted FBI Director James Comey is slimming, with Sen. John Cornyn becoming the latest to drop out of the running on Tuesday.

The Texas Republican and Senate majority whip announced his decision in a written statement Tuesday afternoon.

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

A source familiar with Cornyn’s thinking told Fox News he felt obligated to consider the opportunity of leading the FBI out of a desire to restore stability -- and because his close friend, Attorney General Jeff Sessions, asked him.

It's unclear how seriously Cornyn was being considered for the position, but he was among several candidates interviewed over the weekend.

Rep. Trey Gowdy, R-S.C., also withdrew himself from consideration after speaking with Sessions on Saturday. Gowdy was out of the country on a House Intelligence Committee mission when Comey was fired.

In their conversation, Gowdy shared with Sessions the qualities he believed to be “indispensable” for the next FBI director to have, and his “firm conviction” that he “would not be the right person” for the job.

“I greatly appreciate the Attorney General speaking with me and respecting my decision and I wish him wisdom as he interviews potential candidates,” Gowdy said in a statement on Monday.

Merrick Garland, President Obama’s Supreme Court nominee, was rumored to be under consideration as well, but a close friend reportedly said he is "happy" as a judge in the U.S. Court of Appeals and is "not interested" in the job.

Garland has a lifetime appointment to the bench, and leaving his post would create yet another vacancy for President Trump to fill.

Still, the administration has considered roughly a dozen candidates to replace Comey—a list that includes top lawmakers as well as law enforcement figures.

Former NYPD Commissioner Ray Kelly is still on the shortlist, and could face less Democratic obstruction in a Senate confirmation process -- Senate Minority Leader Chuck Schumer, D-N.Y., endorsed Kelly to lead the FBI in 2011 when Robert Mueller stepped down.

Kelly did not immediately respond to Fox News' request for comment.

Others under consideration include former House Intelligence Committee Chairman Mike Rogers, R-Mich., who was interviewed at the DOJ on Saturday and endorsed by the FBI Agents Association; former Assistant Attorney General Alice Fisher, who was also interviewed on Saturday; Acting FBI Director Andrew McCabe; Mayor of Colorado Springs John Suthers; former federal appellate court judge and now EVP of Boeing John Luttig; Director for the FBI's Criminal, Cyber, Response and Services Branch Paul Abbate; Associate Judge for the New York Court of Appeals Mike Garcia; and Larry Thompson, former deputy attorney general under President George W. Bush.

“We are moving quickly and expeditiously to pick an interim and a permanent replacement, and we’re doing our due diligence –we’re not going to cut any corners,” a source told Fox News.

White House Press Secretary Sean Spicer told reporters on Monday that Sessions and Deputy Attorney General Rod Rosenstein, whose memo on Comey’s handling of the Hillary Clinton email case was cited by the White House as rationale for his firing, were heading the process of finding a replacement.

Fox News' Mike Emanuel and The Associated Press contributed to this report.