Kosovo's Parliament has elected Foreign Minister Hashim Thaci as the country's new president.
The election committee said Mr Thaci secured 71 votes in the third round of voting, in which he needed a minimum of 61 votes to win. He had failed to reach the minimum requirements in the first two rounds.
The other candidate, Rafet Rama, got no votes in the third round and 10 votes were declared invalid.
The voting in the 120-seat Parliament was held without opposition lawmakers, many of whom were suspended from participation after disrupting the work in Parliament with tear gas.
In a brief speech to Parliament, Mr Thaci assured that the trust given to him would be paid back with "work to serve the country, to serve all citizens respecting Kosovo's constitution and laws, working for public order and ... to build a European Kosovo."
Hundreds of Mr Thaci's supporters walked along the capital's streets holding Kosovo, US and Albanian flags and shouting his name while firecrackers lit the sky.
Many leading figures within the opposition were partners with Mr Thaci - a former guerrilla leader - during the war, but later turned against him, accusing him of being power-hungry and corrupt.
Critics also say the 47-year-old, who led the fighters of Kosovo's successful separatist war against Serbia in 1998-99, is not a unifying individual, which is what the Kosovo constitution requires.
The prospect of a Thaci presidency has prompted thousands to protest in the capital Pristina, many hundreds of whom have been camping out in tents in the capital's Skanderbeg Square.
On Friday, opposition supporters threw Molotov cocktails and rocks outside Parliament. Police responded with tear gas and water guns to disperse them and some protesters were arrested.
Police also started to remove the tents raised at the Skanderbeg Square and blocked traffic on some streets surrounding Parliament.
Twelve policemen and one cameraman were injured, according to Basri Lenjani, head of the emergency department at the main hospital in Pristina.
US ambassador to Pristina Greg Delawie deplored that the opposition "once again used violence to disrupt the democratic process in Kosovo" and repeated his support for Kosovo's people and institutions.
Since last September, the chamber has witnessed attacks involving tear gas, pepper spray, whistles and water bottles as opposition forces reject a deal between Kosovo and Serbia giving more powers to ethnic Serbs in Kosovo. The opposition also rejects a border demarcation pact with Montenegro.
Kosovo declared independence in 2008, although that is rejected by Serbia.