The former Soviet state's communist president accused opposition leaders of attempting to stage a coup and vowed to respond. In a telephone conversation with Vladimir Voronin late Tuesday, Russian President Dmitry Medevedev urged his counterpart to find a peaceful solution, the Kremlin said.
Police have withdrawn from both buildings, parts of which were on fire, and rioters were looting offices and burning furniture in the street.
The protests began on Monday, following the Communist Party's victory in parliamentary polls. Voronin is due to step down on May 7, but his party won just enough seats in parliament to be able to elect a successor without the votes of any other group.
Parliament elects the president in the former Soviet republic, now Europe's poorest nation.
In a televised address to the nation on Tuesday, Voronin said: "The leaders of the parties that lost [the parliamentary polls] have embarked on a road toward a coup. Political tools have become useless against the backdrop of the coup. Moldova's authorities are forced to protect the country from rioters, to protect our people's democratic choice."
Voronin said the opposition's goal was to destroy Moldova's statehood, saying the presidential residence and parliament had been seized, and the national flag "desecrated."
Protesters hung Romanian and EU flags removing the Moldovan flag from the presidential residence, and some of them demanded reunification with Romania, shouting "We are Romanians!" Opposition leaders said earlier on Tuesday protests had run out of their control.
A police source said that "some 400 out of 800 members of the inter-service force that was guarding the buildings of the presidential administration and the parliament were injured and sought medical assistance as a result of the protesters' attacks."
Police used water cannons on Tuesday with rioters hurling stones and smashing windows in the capital. Soldiers had earlier used stun grenades to disperse rioters near the parliament building. At least 10 claps were heard in the crowd near parliament, and three ambulances were seen taking away injured people.
Earlier reports citing health officials said some 20 people, mostly rioters and bystanders, received minor injuries during the protest. Many people were walking around the city center watching the events unfold, some with their children.
The protests, which began peacefully, were initially led by Liberal Democratic Party leader Vlad Filat.
A source in the presidential administration said later on Tuesday the government and opposition had agreed to a recount of parliamentary election votes and pledged to end the violence.
However, Liberal Party leader Dorin Chirtoaca rejected the deal and instead demanded a fresh vote. He urged a crowd of 2,000 supporters in central Chisinau to stay until new elections were held.
The European Union's foreign policy chief, Javier Solana, urged the sides to refrain from violence, adding the elections had met international standards, which was echoed by the secretary general of the Council of Europe.
"Some people may not be happy with the outcome, but accepting defeat is a part of the democratic process. As to any specific allegations of electoral irregularities, these should be dealt with in the court not in the street," Terry Davis said.
UN Secretary General Ban Ki-moon also called for all sides to restrain from violence and remain calm.
Voronin, one of only two communist leaders in Europe along with the Cypriot president, has served two consecutive terms and must step down under the constitution, although he has announced plans to stay in politics.