Obama to Pick James B. Comey to Lead F.B.I. James B. Comey, right, with Robert S. Mueller III, whom he would replace as the director of the Federal Bureau of Investigation if confirmed, in 2004. WASHINGTON - President Obama plans to nominate James B. Comey, a former hedge fund executive who served as a senior Justice Department official under President George W. Bush, to replace Robert S. Mueller III as the director of the Federal Bureau of Investigation, according to two people with knowledge of the selection. By choosing Mr. Comey, a Republican, Mr. Obama made a strong statement about bipartisanship at a time when he faces renewed criticism from Republicans in Congress and has had difficulty winning confirmation of some important nominees. At the same time, Mr. Comey's role in one of the most dramatic episodes of the Bush administration - in which he refused to acquiesce to White House aides and reauthorize a program for eavesdropping without warrants when he was serving as acting attorney general - should make him an acceptable choice to Democrats. It is not clear when Mr. Obama will announce the nomination. Senior F.B.I. officials have been concerned that if the president does not name a new director by the beginning of June, it will be difficult to get the nominee confirmed by the beginning of September, when Mr. Mueller by law must leave his post. The White House declined to discuss Mr. Comey on Wednesday. But according to the two people briefed on the selection, Mr. Comey traveled from his home in Connecticut in early May to meet with the president at the White House to discuss the job. Shortly afterward, he was told that he was Mr. Obama's choice, and they met again for a further discussion. Mr. Comey, 52, was chosen for the position over the other finalist, Lisa O. Monaco, who has served as the White House's top counterterrorism adviser since January. Some Democrats had feared that if the president nominated Ms. Monaco - who oversaw national security issues at the Justice Department during the attacks in Benghazi, Libya, last September - Republicans would use the confirmation process as a forum for criticism of the administration's handling of the attack. In the 2004 episode that defined Mr. Comey's time in the Bush administration, the White House counsel, Alberto R. Gonzales, and Mr. Bush's chief of staff, Andrew H. Card Jr., sought to persuade Attorney General John Ashcroft - who was hospitalized and disoriented - to reauthorize the administration's controversial eavesdropping program. Mr. Comey, who was serving as the acting attorney general and had been tipped off that Mr. Gonzales and Mr. Card were trying to go around him, rushed to Mr. Ashcroft's hospital room to thwart them. With Mr. Comey as well as Mr. Mueller in the room, Mr. Ashcroft refused to reauthorize the program. Mr. Bush later agreed to make changes in the program, and Mr. Comey was widely praised for putting the law over politics. According to testimony Mr. Comey provided to Congress in 2007, Mr. Ashcroft rose weakly from his hospital bed when Mr. Gonzales and Mr. Card approached and refused to approve the program. "I was angry," Mr. Comey said in his testimony. 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. I thought he had conducted himself in a way that demonstrated a strength I had never seen before, but still I thought it was improper. Mr. Comey, whose nomination was first reported by NPR, will inherit a bureau that is far different from the one Mr. Mueller took over a week before the Sept. In the aftermath of those attacks, Mr. Mueller undertook the task of remaking the bureau into an intelligence and counterterrorism agency from one that had concentrated on white-collar crime and drugs. The number of agents has grown to roughly 14,000 from 11,500 under Mr. Mueller, and the bureau has heavily invested in its facilities and capabilities, improving its computer systems, forensics analysis and intelligence sharing. An earlier version of this article misstated the length of J. Edgar Hoover's tenure leading the agency that became known as the Federal Bureau of Investigation. It was 48 years, not nearly 40 years.