By Matthew Davis
BBC News, Washington
President Bush has suffered one of the biggest embarrassments of his presidency at a time when he faces a mountain of other problems.
President Bush has defended Harriet Miers against criticism
Harriet Miers' lack of experience as a judge and allegations that she was not conservative enough had led to growing criticism of Mr Bush's Supreme Court choice, most notably from right-wing Republicans.
It had been clear for weeks that the nomination was in trouble; groups had been lobbying hard against her, allegations of cronyism were biting, meetings on Capitol Hill had gone badly.
Yet the timing of Ms Miers' withdrawal caught observers by surprise, coming at a time when all eyes were on impending developments in a CIA leak scandal that threatens to engulf two senior Bush administration aides.
Democrats have not had to lift a finger to create the turmoil that now surrounds the Bush presidency.
Ms Miers' decision to step aside is being seen as an attempt to save face, amid the realisation that support for her candidacy simply was not there - even from the president's conservative base.
'No paper trail'
In a letter to the president, Ms Miers said she was concerned about senators' plans to seek documents from her service as legal counsel to Mr Bush, in order to gain insights into her judicial philosophy.
MIERS' CAREER PATH
1985: First female president of the Dallas Bar Association
1992: First woman to head the Texas State Bar
1995-2000: Chairwoman of the Texas Lottery Commission
2001: Joins White House staff as president's staff secretary
2003: Appointed Deputy Chief of Staff
2004: Named White House counsel
Mr Bush agreed that publication of such internal documents would undermine a president's ability to receive candid advice and "reluctantly" accepted her decision.
Ever since Ms Miers' nomination was announced, Republicans looking forward to supporting a tough-minded social conservative with an anti-abortion, anti-gay rights track record had felt betrayed, according to some observers.
As Eugene Robinson of the Washington Post told the BBC earlier this month, the lack of hard evidence of her positions on issues like abortion, capital punishment and gay rights helped undermine her candidacy.
"The conservative base said, OK well we can take [John] Roberts, he's bright, we can tell he is conservative," Robinson said.
"Then to come up with Harriet Miers, the fact is that we don't know where she stands, she is not identified with any particular philosophy, she has left no paper trail."
Harriet Miers was a very personal choice by the president. She has been a close member of his staff for
many years, and her withdrawal will be seen as a personal blow to Mr Bush.
Coupled with the flagging support for the war on Iraq and the record lows in Mr Bush's personal approval ratings, some are viewing this setback as a "defining moment" for the president.
Political commentators have suggested that his presidency has been weakened, and that he can expect challenges on future controversial measures.
Yet the withdrawal provides Mr Bush with an opportunity - and a problem.
If he nominates a strong conservative with a judicial track record, to help mend fences within his party, he risks all-out war with the Democrats.
But if he fails to pull Republicans back together, Mr Bush may hasten the eventual fate of all second-term presidents - becoming a lame duck leader.