Karl Rove, George W Bush's most trusted and senior adviser, has paid tribute to the US president as he confirmed his intention to leave the White House.
Mr Rove, who will step down at the end of August, said he was "deeply proud" to have served Mr Bush and the US.
But he insisted the time was right to leave, saying he was quitting the White House for the sake of his family.
He has worked with Mr Bush since 1993, and was seen as the architect of Mr Bush's 2000 and 2004 election wins.
For this he is highly regarded by Republicans, but at the same time equally reviled by Democrats.
"Karl Rove is moving on down the road," Mr Bush said, standing alongside his friend and colleague at White House.
The president described Mr Rove as a "dear friend" who he had worked alongside for a long time to serve both state and country.
An emotional Mr Rove said working in the White House had been the "joy and honour of a lifetime".
He was full of praise for the president, describing him as a man of decisive action, a man who strengthened the economy, created jobs and undertook bold reforms.
"I will miss, deeply miss, my work here," Mr Rove said, calling his years in the White House "exhilarating".
Mr Rove has been accused of underhand political tactics since his teenage years.
As a student, he invited Chicago vagrants to turn up for free beer at a plush reception for a Democrat state candidate - an incident he later described as a "youthful prank" that he regretted.
He has continued to be dogged by controversy.
Last month, the US Senate issued a subpoena against him as part of an investigation into the sacking of eight federal prosecutors, but Mr Bush ordered him not to testify, citing executive privilege.
ALL THE PRESIDENT'S MEN
Karl Rove, chief political strategist, leaves 31 Aug
Donald Rumsfeld, defence secretary, quit after 2006 mid-term elections
Andrew Card, chief of staff, quit March 2006
Paul Wolfowitz, deputy defence secretary, quit March 2005
Colin Powell, secretary of state, resigned after President Bush's first term, Nov 2004
SURVIVORS FROM 2000
Dick Cheney, vice-president
Condoleezza Rice, secretary of state, was national security adviser in first term
Alberto Gonzales, attorney general, was White House counsel
Mr Rove was also investigated in connection with the exposure of CIA agent Valerie Plame, though prosecutors decided he should not face any charges.
Mr Rove told the Wall Street Journal that he had first floated the idea of leaving last year, but had delayed his departure when the Democrats took control of Congress.
He said he took a final decision to leave after White House Chief of Staff Joshua Bolten told aides that if they stayed after the end of August they would be obliged to stay in the administration until Mr Bush's own departure in January 2009.
"There's always something that can keep you here, and as much as I'd like to be here, I've got to do this for the sake of my family," he said.
He said he expected Mr Bush's current poor ratings to improve, and that conditions in Iraq would get better as the military surge continued.
A Republican had a good chance of winning the 2008 presidential election, he said, because Democrats would choose the "fatally flawed" Hillary Clinton as their candidate.