Kosovo parliament elected foreign minister and former premier Hashim Thaci as the country’s new president amid clashes between opposition activists and police outside Kosovo's parliament in the capital, Pristina.
The election commissioner announced on Friday that Thaci has been elected with 71 out of 81 votes.
"We conclude that Mr Hashim Thaci was elected president of the Republic of Kosovo for a term of five years," the commission said.
Following the election, Thaci thanked "all those in the political sphere".
"I pledge to build a new Kosovo, a European Kosovo and to deepen our relationship with US," he said.
Tension was high during the election as hundreds of protesters asking the government to resign gathered outside of the parliamentary building.
Parliamentary debate on the election was disrupted when two tear gas canisters were opened on the opposition benches, prompting lawmakers to leave the chamber.
Protesters also took to the streets calling for the government to step down and hold early elections, amid widespread frustration over alleged high-level corruption, unemployment at around 40 percent and a government deal with Serbia.
"Thaci did nothing for eight years as prime minister to resolve unemployment, nor did he even attempt to improve the economy. It would be a disaster for Kosovo if he is in power for another five years," said Agron Mustafa, a 29-year-old unemployed lawyer.
Security measures were taken outside the building as about 200 anti-riot police officers with shields were stationed at the entrance to parliament.
Critics say Thaci, who led Kosovo's successful separatist war against Serbia in 1998-99, is not a unifying individual, which is what the Kosovo constitution requires. Many leading figures within the opposition are former partners of his during the war.
Kosovo, which broke away from Serbia eight years ago, has faced a political crisis in recent months with opposition parliament members almost paralysing the work of parliament with regular demonstrations. The chamber has been witness to attacks which have involved the usage of tear gas, pepper spray, whistles and water bottles.