US President George Bush has unexpectedly announced that the head of the CIA, Porter Goss, is stepping down.
Porter Goss's resignation surprised friends and pundits alike
Mr Goss has served in the role for less than two years, since being given the job of reforming the agency after a series of intelligence failures.
Mr Bush said Mr Goss had "a tough job and he led ably".
The BBC Washington correspondent says the most likely reason for his departure is that Mr Goss objected to his boss, John Negroponte.
Mr Negroponte was appointed to the post of national intelligence director last year.
Correspondents say that a replacement for Mr Goss could be announced as early as Monday, with Air Force General Michael Hayden, top deputy to Mr Negroponte, widely tipped to take over.
Announcing his resignation, Mr Goss said: "I believe the agency is on a very even keel, sailing well, and I honestly believe that we have improved dramatically."
He praised the president for giving him the "latitude" to reform the intelligence service.
Graduated from Yale, 1960
Speaks Spanish and French
Was an undercover CIA spy for 10 years until a near-fatal illness forced his retirement in 1971
Elected to Congress in 1988
"I honestly can report to you, sir, that we are safer for your efforts," he said.
In a statement, he added that the role had been an "honour".
"The past 18 months have been among the proudest of my five decades in public service," he said.
The BBC's correspondent in Washington, Justin Webb, says the announcement came as a bolt from the blue.
While there have been several changes at the top of the Bush administration recently, and more are expected, Mr Goss's name was never mentioned.
Friends of the former CIA agent and Republican congressman said they were hugely surprised.
There has been speculation that Mr Goss was not happy with the reduced access to the president he was afforded after the appointment of John Negroponte to oversee the work of all the intelligence agencies, our correspondent adds.
He was picked by Mr Bush to replace George Tenet at the head of the agency in September 2004.
The CIA had been rattled by its failure to prevent the 11 September attacks and its faulty intelligence used to justify the war on Iraq.
When he took the job he used to present the president with a daily intelligence briefing, but that task has since been taken away.
'CIA in free fall'
There have also been rumblings of discontent at the CIA's headquarters in Langley, Virginia.
He upset some staff by bringing in several top aides from Congress, who were thought by some in the CIA to be too political.
Several high-level CIA staff have resigned recently.
Jane Harman, the leading Democrat on the House intelligence committee, said last week: "The CIA is in a free fall."
"I've never been as concerned about our nation's security as I am this week," she said.