There were chaotic scenes in Mexico's Congress as left-wing lawmakers forced outgoing President Vicente Fox to abandon his final annual address.
Before Mr Fox arrived, the legislators, who allege fraud in recent elections, marched onto the main podium where they shouted slogans and waved placards.
Mr Fox later delivered the speech on TV from his official residence.
He upbraided the lawmakers, saying "all voices should be heard...[but] respect for the law is not discretionary".
The legislators support Andres Manuel Lopez Obrador, who has been mounting large protests in Mexico City for the past month after being declared the loser in July elections.
A recount of about 9% of the votes cast in the 2 July elections has been conducted, but earlier this week Mexico's top electoral court ruled the recount had made no significant difference to the original outcome.
The original count saw Felipe Calderon - of the National Action Party (PAN) - win just over half a percentage point more support than Mr Lopez Obrador, of the Party of the Democratic Revolution (PRD).
But the BBC's Duncan Kennedy, in Mexico City, says the night's events show that the bitterly divisive presidential race has not yet been resolved.
President Fox had been due to give a valedictory state-of-the-nation address to Congress before stepping down later this year.
But some of the 126 PRD deputies vowed to disrupt proceedings, and just before the president was due to arrive, dozens of lawmakers stormed the stage.
They were protesting against the security cordon set up around congress by several thousand police officers,. The deputies condemned the 1-km (0.6-mile) ring as a "suspension of individual guarantees".
Wearing his presidential sash, Mr Fox hovered backstage for some moments before abandoning his attempt to give the speech. He handed in a written copy - as the constitution requires - and was driven away.
Just over an hour later he addressed the nation on television from the presidential residence.
He said Mexico was now "truly free", but that such freedom demanded respect for the law.
"Whoever attacks our laws and institutions also attacks our history and Mexico," said Mr Fox. "Mexico demands harmony, not anarchy."
It is only six years since Mexico became a multi-party democracy, and the events of the past few hours show that system is being put under intense pressure, our correspondent says
A divided nation now appears even more politically polarised.
While Mr Lopez Obrador's supporters may see what happened in Congress as a victory, President Fox still commands strong support ratings and such events may anger many Mexicans, our correspondent adds.
Outside Congress, there was a tense build-up to Mr Fox's attempts to make his speech in the chamber, as hundreds of police in riot gear and equipped with water cannon and attack dogs faced Mr Lopez Obrador's crowds of supporters.
Mr Lopez Obrador says he may try to rule from the streets
But the protest remained largely peaceful, apart from some bricks and bottles thrown by protesters, and the police began to stand down after Mr Fox departed.
Mr Lopez Obrador has led a month-long campaign of street demonstrations calling for a recount of all votes in the election.
He has said he does not want his movement to turn violent - but with legal and constitutional options now closed to him, the risk of confrontation may be higher, our correspondent says.
Mr Lopez Obrador has suggested he might set up a "parallel government" to rule from the streets.
One of his supporters told the Associated Press he was ready to fight for Mr Lopez Obrador "until the death, until the final consequences".
"We lived 500 years of repression, and now we represent the new face of Mexico," said Fernando Calles, a 26-year-old university professor.
The deadline for the top electoral court to declare a president-elect or call fresh elections is 6 September.