Rama defeated former health minister Arben Vitia from the governing left-wing Self-Determination Party, or Vetëvendosje, of Prime Minister Albin Kurti.
The new mayor of Pristina, Përparim Rama, celebrated with his supporters on Sunday after winning in the second round of the municipal elections in Kosovo's capital.
This is the first political post for Rama, since the architect recently joined the ranks of the Democratic League of Kosovo or LDK. His candidacy is widely seen as an attempt to revamp the LDK after disappointing results in the parliamentary elections in February.
He defeated former health minister Arben Vitia, from the governing left-wing Self-Determination Party, or Vetëvendosje, led by prime minister Albin Kurti.
Rama campaigned on the promise of turning the capital into a greener, pedestrian-friendly city, pledging to resolve the issue of traffic jams plaguing the city and planting 800 thousand trees during his four-year mandate.
After the victory, Rama told the gathered supporters that the opportunity to put his plan into action "is a dream come true".
"From urban chaos, we will turn [Pristina] into a fantastic city with huge potential for its youth and for everyone."
Rama's victory is also seen as a sign that Vetëvendosje popularity might be slipping since Pristina is a key stronghold of Vetëvendosje voters.
The second round of local elections on Sunday saw mayors elected in 21 out of 38 municipalities.
Vetëvendosje (or VV) won in four other communes, one more than 2017, but was expected to do much better after it scored an unprecedented victory in general elections held in February, with 50.28 per cent of the vote representing the largest margin of support won in any election since 1999.
LDK won in four other municipalities, adding to its first-round tally for a total of seven, while Democratic Party of Kosovo (PDK) won nine in the two rounds.
The Srpska Lista party of Kosovo’s ethnic Serb minority, which is close to the Serbian government in Belgrade, won one more mayoral post, adding to nine it won in the first round in the northern Kosovo districts.