Alex Wong / Getty Images file Former U.S. Deputy Attorney General James Comey testifies during a hearing before the House Commercial and Administrative Law Subcommittee of the Judiciary Committee May 3, 2007 on Capitol Hill in Washington, DC.

The man poised to be the next head of the FBI is a former prosecutor respected by both sides of the aisle who may be best known for his role in a Hollywood-esque Washington showdown that thwarted the reauthorization of a controversial surveillance program.

President Barack Obama intends to nominate former Deputy Attorney General James Comey, 52, to succeed Robert Mueller as FBI director, sources confirmed to NBC News on Wednesday. Though Comey served under President George W. Bush, he has won praise from Democrats for his time at the Department of Justice, especially after details emerged of his dramatic effort to stop the reauthorization of a warrantless eavesdropping program in March 2004.

That night, Comey raced to George Washington University Hospital after getting word that White House Counsel Alberto Gonzales and Bush Chief of Staff Andrew Card Jr. were heading to the bedside of ill Attorney General John Ashcroft. Comey ran up the stairs into Ashcroft's hospital room out of fear that his ailing boss could be coerced into approving the program's continuation, he recalled in a 2007 congressional hearing.

But when Card and Gonzales arrived, Comey told Congress, Ashcroft explained his opposition to the program and said any reauthorization would require Comey's signature since he was the acting attorney general at the time. The men left, and soon after Bush agreed to change the program.

“I was angry. I had just witnessed an effort to take advantage of a very sick man, who did not have the powers of the attorney general because they had been transferred to me," Comey said in his testimony.

Rachel Maddow describes the hospital bedside drama in which James Comey, reported to be President Barack Obama's pick to head the FBI, thwarted the Bush administration's domestic spying plans.

Comey first caught the attention of the White House in 2001 when he successfully prosecuted 14 men after being asked to take over the case of a 1996 terrorist bombing in Saudi Arabia that killed 19 U.S. troops. Following that case he was appointed to one of the Justice Department's most high-profile jobs -- United States attorney for the Southern District of New York.

While in New York he oversaw cases against terrorism suspects, WorldCom executives and Martha Stewart.

He rose quickly in the department and served as deputy attorney general from 2003 to 2005. Since then, Comey has served as general counsel of defense contractor Lockheed Martin and later at investment firm Bridgewater Associates. This year he joined Columbia University's law school as a senior research fellow and joined the board of international banking giant HSBC.

A 2001 New York Times profile of the Yonkers, N.Y.-born attorney describes Comey as a workhorse who rose by taking on any case colleagues did not want. The paper reported that he and a fellow lawyer went by the motto: "We'll take any dog."

Along with his work ethic, Comey's height, 6-foot-8, also makes him particularly memorable to those he has come across in his many years as a litigator.

After making a name for himself trying criminal cases as an assistant United States attorney in Manhattan the late '80s and early '90s, Comey briefly went into private practice and went on to head the United States attorney’s office in Richmond, Va.

It was in Virginia where he developed Project Exile, an initiative that began in 1997 and is credited with dramatically decreasing the amount of gun violence in Richmond. The idea was to stiffen sentences for firearms prosecutions and run advertisements letting residents know of the harsher penalties. The program's success has led other cities to adopt similar measures.

If confirmed by the Senate, Comey will take over the agency from Mueller, who has headed the FBI for 12 years. Mueller's departure has been marked by questions over how thoroughly the FBI investigated Boston bombing suspects Tamerlan and Dzhokhar Tsarnaev after being alerted by foreign agencies of possible ties to Islamic militants.

Mueller is expected to leave his post by September.

Related stories: