The appointment means that elections that would have delayed reforms needed for membership of the European Union and Nato are no longer required.
Around 85 of the 90 deputies present at the session voted for Topi and only five backed Neritan Ceka, the head of the opposition Democratic Alliance party.
"I will be the president of all Albanians ... I will give my best for Albania's integration into the European Union and Nato," Topi said.
Elections to pick a new head of state to replace Alfred Moisiu, whose mandate as president ends on July 24, had already been postponed several times because of political bickering.
Topi, a 50-year-old biology professor and deputy president of the Democratic party of Sali Berisha, Albania's prime minister, will succeed Moisiu for a five-year mandate.
Under the Albanian constitution, a candidate has to win support from three-fifths of deputies in the 140-seat parliament, or 84 votes.
If a president is not elected in five rounds of voting, parliament must be dissolved and early elections held.
This was the fourth attempt by the Albanian parliament to elect a new head of state, as Berisha's party and the opposition Socialist Party of Tirana mayor, Edi Rama, have for months failed to agree on a presidential candidate.
The opposition had demanded the ruling party withdraw Topi's candidacy, insisting a future president should be from the left-wing bloc as Moisiu had been a right-wing candidate.
The Socialists and their allies had urged their MPs to boycott the vote, but at least seven did not adhere to the calls.
After the session, Berisha said: "I want to thank all deputies who have taken part in the vote to avoid the risk that early elections could bring to Albania."
Güncelleme Tarihi: 21 Temmuz 2007, 23:28