Alastair Campbell's departure had been on the cards for weeks but he will leave at a time when his own reputation is still on the line because of the Hutton Inquiry into the death of weapons inspector Dr David Kelly.
Mr Campbell had wanted to walk out of No 10 Downing Street with his head held high but the unexpected death of Dr Kelly threw his personal plans into disarray.
Nonetheless Mr Campbell believes Tony Blair's commanding appearance in front of Lord Hutton on Thursday - and the prime minister's categoric assurance there was no interference with the intelligence information on Iraq's weapons of mass destruction - has provided the window he needed to announce his resignation.
Mr Campbell has understood the mindset of journalists
In his evidence to the inquiry, Mr Blair, backed up the chairman of the joint intelligence committee John Scarlet, insisting that the dossier was authoritative and objective and had not - as the BBC alleged - been "sexed up" by Mr Campbell against the wishes of the intelligence services.
When giving his own evidence to Lord Hutton the previous week, Mr Campbell had acknowledged the way Dr Kelly's name dribbled out into the newspapers was wrong.
If there had been a proper announcement it would have been possible first to put in place the kind of support which he and his family should have had.
Mr Campbell said he felt Dr Kelly's death was "very sad".
What also emerged during his evidence was a sense of Mr Campbell's own sense of contrition at having got embroiled in a dispute with the BBC which escalated far beyond what Mr Blair had expected.
While the prime minister initially backed his communications director in what became a highly personal campaign to force the BBC to back down, eventually Mr Blair told his spin supremo to cool it.
Few political partnerships have been as robust and effective as the close working relationship between Mr Campbell and Mr Blair.
His great strength for the prime minister has been his ability to understand the mindset of British journalists and to use that knowledge to plan the communications strategies first for the Labour Party and then the Blair government.
Despite the cloud left hanging over Mr Campbell by the Hutton inquiry, he leaves behind a substantial legacy.
He imposed a transformation in the way the government communicates with the news media.
He told 1,000 civil servants they had to learn how to "grab the news agenda" and he forced them to speed up their response and meet the demands of 24 hour rolling news.
Mr Campbell was also at the cutting edge in the development of the media strategies adopted by the United States and Britain in the recent conflicts in the former Yugoslavia, Afghanistan and Iraq.
Mr Campbell has always been a committed Labour Party propagandist and on becoming a political reporter with the Daily Mirror he became a firm friend of the former Labour leader, Neil Kinnock.
After Labour's 1992 General Election defeat - and a vicious anti-Kinnock campaign by some newspapers - Mr Campbell vowed to help get Labour elected.
In 1994 he became Mr Blair's press secretary and helped mastermind Labour's landslide victory in the 1997 General Election.
If anyone made sure the word "sleaze" was hung round the neck of the outgoing Conservative Prime Minister John Major it was Mr Campbell but he has now become a victim of Labour's obsession with spin and media manipulation.
Mr Campbell leaves knowing the Conservatives and Liberal Democrats believe they are succeeding in pinning the word "spin" to Blair.
If the prime minister is to honour his repeated undertaking to turn his back on spin, it cannot be done with Mr Campbell still in post.