Iran's embattled opposition leader urged his supporters Wednesday to keep pressing for their rights, and he joined a reformist ex-president to denounce what both men called the regime's "coup" against those contesting the outcome of last month's presidential election.

Mir Hossein Mousavi said he considered Iran's cleric-led government illegitimate, and he demanded that it release all political prisoners and institute electoral reforms and press freedoms, while former President Mohammad Khatami lashed out at what he termed "a poisonous security situation" in the wake of violent street protests.

In separate but equally stinging statements posted on their Web sites, Khatami accused Iran's leadership of a "velvet coup against the people and democracy," and Mousavi said the government's crackdown on demonstrators was "tantamount to a coup."

"Given what has been done and declared unilaterally, we must say that a velvet revolution has taken place against the people and democratic roots of the system," Khatami said, alluding to the government's declaration of incumbent President Mahmoud Ahmadinejad as the winner of the June 12 election.

"People's protests were suppressed, those who were required to protect people's rights humiliated the people ... yet it (the government) speaks of national reconciliation and peace," Khatami said.

The two men's latest displays of defiance came as Iran's feared Basij militia accused Mousavi of undermining national security and asked a prosecutor to investigate his role in violent protests, and the European Union considered a pullout of all 27 of its ambassadors in protest.

Mousavi said he was troubled by "the bitter, widespread distrust of the people toward the declared election results and the government that caused it."

"It's not yet too late," said Mousavi, who has slipped from public view in recent days. "It's our historic responsibility to continue our complaint and make efforts not to give up the rights of the people."

Mousavi also condemned alleged attacks by security forces on college dormitories where "blood was spilled and the youth were beaten," and he called for a return to a more "honest" political environment in the Islamic Republic.

"A majority of the people -- including me -- do not accept its political legitimacy," Mousavi said, adding: "There's a danger ahead. A ruling system which relied on people's trust for 30 years cannot replace this trust with security forces overnight."

State television meanwhile reported that all but one of nine Iranian employees of the British Embassy in Tehran had been released, and the sole Iranian still in custody was being held on suspicion of playing a role in post-election protests. British Foreign Secretary David Miliband said he had information suggesting two local employees might still be in detention.

The detentions sharply escalated Iran's standoff with the West over the ferocity of its crackdown on demonstrators. Both Britain and the EU had condemned the detentions as "harassment and intimidation."

The semiofficial Fars news agency said the Basij -- known as supreme leader Ayatollah Ali Khamenei's street enforcers -- sent the chief prosecutor a letter accusing Mousavi of taking part in nine offences against the state, including "disturbing the nation's security," which carries a maximum penalty of 10 years' imprisonment.

Iran's regime says 17 protesters and eight Basiji were killed in two weeks of unrest that followed the election. Mousavi insists the vote was tainted by massive fraud and that he -- not incumbent President Mahmoud Ahmadinejad -- is the rightful winner.

The powerful Guardian Council, Iran's top electoral oversight body, pronounced the election results valid earlier this week -- paving the way for Ahmadinejad to be sworn in later this month for a second four-year term.

"Whether he wanted to or not, Mr. Mousavi in many areas supervised or assisted in punishable acts," said the Basij letter, which also accused Mousavi of bringing "pessimism" into the public sphere.

Fars also reported Wednesday that a total of 1,032 people were detained during post-election unrest. It cited police chief Ismail Ahmadi Moghaddam as saying most had been released and the rest "have been sent to the public and revolutionary courts" in Tehran.

In another sign of a tightening government clampdown on anyone challenging Ahmadinejad, a reformist political group said Wednesday that authorities banned a newspaper allied to presidential candidate Mehdi Karroubi after he denounced Iran's government as "illegitimate" because of claims of voting fraud.

The closure of the daily Etemad-e-Melli, or National Confidence, is another move by officials seeking to block media and Web sites critical of Ahmadinejad.

Karroubi, a former parliamentary speaker, received only a fraction of the votes in the results announced by authorities and joined Mousavi in demanding a new election. Recently, however, Karroubi has stepped up his independent criticism of the election and could emerge as a leading dissident voice against Ahmadinejad.

On Tuesday, he issued a harshly worded statement that blasted Ahmadinejad's government and pledged to continue challenging its authority. Karroubi's political group, the National Confidence Party, said the newspaper was shut down in response.

"I don't consider this government as legitimate," said the statement posted on Karroubi's Web site. "I will continue the fight under any circumstances and using every means."

Ahmadinejad cancelled plans to travel to Libya as an observer at an African Union summit, Libyan officials said. It would have been Ahmadinejad's second trip outside Iran since the election.

Iran's Foreign Ministry said unspecified "preoccupations" kept the president at home. Some African officials had complained that Ahmadinejad's presence at the three-day gathering could divert attention from Africa's problems.

Ahmadinejad on Tuesday repeated the claims that post-election street riots were linked to a "soft revolution" aided by foreign powers.

"Enemies, despite overt and covert conspiracies to topple (the ruling system) through a soft overthrow, failed to reach their goals," state television quoted Ahmadinejad as telling Intelligence Ministry officials.

It's unclear how many people have been detained during the post-election riots and protests, but at least one group, the Paris-based International Federation of Human Rights, claimed at least 2,000 arrests have been made. The figures could not be independently verified because of tight media restrictions.

Iran's cleric-led government has said Ahmadinejad would be sworn in as early as July 26.

State-run Press TV reported Wednesday that a grenade was found in a trash can inside a women's bathroom at a mausoleum in Tehran, and it cited an official as saying the incident was intended "to invoke fear in the minds of the Iranians who participated" in the disputed election.

Amnesty International said Tuesday it was concerned about the possibility that many detainees "could be severely tortured" in custody, and it joined other human rights groups in demanding the immediate release of all political prisoners.

Ahmadi Moghaddam, the police chief, said Iranian intelligence officials were seeking Dr. Arash Hejazi, an Iranian doctor who tried to save Neda Agha Soltan after she was fatally shot on the sidelines of one of the demonstrations.

Hejazi, who has since fled to London, told the BBC last week that Soltan -- who became an opposition icon after video of her bleeding to death was circulated worldwide -- apparently was shot by a member of the volunteer Basij militia. He said protesters spotted an armed member of the militia on a motorcycle, and stopped and disarmed him.

But Ahmadi Moghaddam described the circumstances as a fabrication that had nothing to do with the street riots. He did not elaborate on why officials want Hejazi, but the regime repeatedly has implicated protesters and even foreign agents in Soltan's death.