Mexican riot police fired tear gas and used clubs to break up a protest by supporters of left-wing presidential challenger Andres Manuel Lopez Obrador.
This is the first time force as been used on the election protesters
Leftist lawmakers were among at least 30 people injured in the scuffles outside Congress in Mexico City.
Mr Lopez Obrador's supporters have been camped out in protest at the 2 July election they say was stolen by conservative rival Felipe Calderon.
This is the first time the authorities have used force on the protesters.
Mr Lopez Obrador later told his supporters that the events showed the authorities are "taking off their masks and putting aside their talk of supposed legality and respect".
Mr Lopez Obrador lost the election by 240,000 votes, according to the official count. He has alleged fraud, and has since led a mass civil disobedience campaign to demand a full recount.
A court-imposed recount of votes from 9% of polling centres has been completed but the result has not yet been announced.
Mr Calderon told a news conference he was confident the recount would confirm his victory, and called on Mr Lopez Obrador to "reconsider his attitude".
Violence broke out as left-wing protesters tried to set up a camp outside Congress ahead of the outgoing President Vicente Fox's last state-of-the-nation address on 1 September.
Stones were thrown at lines of police who fired back with tear gas.
"They hit us all, they fired gas at us. I still haven't recovered from the tear gas," Elias Moreno of Mr Lopez Obrador's Party of the Democratic Revolution (PRD) said.
The federal police said they had followed guidelines but that the protesters had been blocking access to Congress. They called on the protesters to "demonstrate within the bounds of the law".