An influential member of the Bush administration is leaving the government in a storm of controversy - for the second time.
Retired admiral John Poindexter submitted his resignation on Tuesday, complaining his work at the Pentagon had been plagued by "a great deal of misunderstanding".
A leading player in the 80s Iran-contra scandal, Poindexter made his way into the Bush administration after the 11 September attacks.
His departure follows an angry outcry in Congress about his latest brainchild - an online futures market in which traders could bet on the likelihood in the Middle East of coups, terrorist attacks and assassinations.
The $8 million-project raised eyebrows at the top echelons of the Pentagon and was nipped in the bud at the first sign of trouble.
But Poindexter's larger undertaking – a public monitoring programme - remains alive, much to the dismay of civil rights advocates.
"I regret we have not been able to make our case clear and reassure the public that we do not intend to spy on them" -- John Poindexter
The project that Democratic Senator Ron Wyden characterized as "the most sweeping surveillance program ever proposed in the United States" calls for scouring cyberspace for telltale signs of terrorist activity.
But Poindexter, whose resignation becomes effective on August 29, remains unrepentant.
"I regret we have not been able to make our case clear and reassure the public that we do not intend to spy on them," Poindexter wrote in his resignation letter.
"Now I have decided it is time for me to step down."
His resignation marks the retired admiral's second retreat from the government under heavy fire.
The former national security adviser was forced to leave in 1986, after he was implicated in the Iran-contra operation that involved selling arms to Iran and diverting profits to rebels in Nicaragua.
Because arms sales to the Nicaraguan rebels were banned under US law, Poindexter was convicted in 1990 on charges of conspiracy, obstruction of Congress and making false statements.
However, an appeals court overturned the conviction less that a year later, arguing that his congressional testimony - given under an immunity deal - may have been improperly used during the trial.