State television reported that at least five people were killed and more than 300 others were injured in clashes that continued well into Tuesday night.
Mongolian National Broadcasting (MNB) quoted a doctor at a local hospital as saying that two of the five people had been shot dead.
The state-run channel also said that 400 policemen had been injured.
The president has promised to investigate "any irregularities during the election", according to the website Mongolia News.
Police used tear gas, rubber bullets and water cannon to beat back violent protesters who fought police and smashed their way into the headquarters of the ruling Mongolian People's Revolutionary Party (MPRP).
Local journalist Irja Halasz told Al Jazeera that protesters kept restarting fires that had been extinguished and stopped fire fighters from getting close. She said they also hurled stones to push back the police line.
The offices of the General Election Commission were also attacked by protesters on Tuesday night, demanding that officials resign over alleged voting irregularities.
There were also reports of looting in an art gallery and government offices during the protests.
Mongolia's justice minister has ordered the capital placed under a 10pm-8am curfew and warned that police "will use necessary force" against protesters.
|The government threatened to use "necessary force" to stop looters [EPA]
Mongolians voted in parliamentary elections on Sunday that focused on plans to improve the economy on how to share the country's mineral wealth.
International observers say that overall the election was free and fair, but new election rules that changed the first-past-the-post system to one of multi-member constituencies have led to procedural problems and confusion.
Fraud allegations first emerged in two districts in the capital awarded to the ruling party, but were contested by two popular members of the Civic Movement party.
But protesters later called the entire election into question with opposition Democrats saying that their party had won the poll, alleging widespread vote-rigging by the ruling MPRP.
"The Mongolian people voted for democracy and not for the MPRP, who are ex-communists," Magnai Otgonjargal, vice-chairman of the Civic Movement party, said.
Preliminary results showed the MPRP, which was also in power when Mongolia was a Soviet satellite, winning 46 seats, giving the party more than half of the 76 seats in parliament.
Speaking to Al Jazeera, William Infante, Asia Foundation country representative in Mongolia, said a big group of protesters that had gathered outside the parliament building and MPRP headquarters had cleared by Wednesday morning.
"It appears they dispersed in the early hours. I did not see any evidence of protesters on the streets this morning," he said, adding that it appeared that police had the situation under control.
Infante said troops were also stationed in all government buildings in Ulaan Baator after the president declared a state of emergency.
"There is no indication that there will be a re-igniting of the violent protests that we saw yesterday," he said, adding that Asia Foundation observers "did not detect any irregularities" on polling day.