Joseph Lambert was elected as the interim successor to Haiti's assassinated president Jovenel Moise by the country's senate on Friday.
"I express my humble gratitude to the political institutions that support me," Lambert wrote on Twitter on Friday evening.
He said he wanted to pave the way for a democratic transition of power.
Presidential and legislative elections are scheduled for September in Haiti.
However, the Senate – the upper house of the Haitian parliament – has not had a quorum since January 2020. It was therefore initially unclear whether Lambert would actually be able to take office.
Because a general election scheduled for October 2019 was canceled, partly due to violent protests against Moise, there are only 10 out of 30 senators whose terms have not expired.
There is no one left in the lower house, the Chamber of Deputies.
Eight of the 10 senators voted for Lambert, and two abstained, according to media reports.
There has also been considerable confusion over the role of interim prime minister following the shock assassination at Moise's home.
It was to be the neurosurgeon Ariel Henry, whom Moise had appointed to the post on Monday.
Henry's swearing-in ceremony, planned for Wednesday, was however canceled after the killing.
Claude Joseph, the foreign minister and former interim prime minister who was set to be replaced by Henry, declared himself acting interim head of government.
As such, he has given speeches to the nation, signed decrees and held talks with representatives of foreign governments in recent days.
Moise was attacked and shot dead at his residence on Wednesday night. His wife Martine was seriously injured. She is being treated in the U.S.
According to the Haitian police, 28 foreign mercenaries carried out the murder: 26 Colombians and two Americans of Haitian descent.
So far, 20 suspects have been arrested and three killed. The background on the crime is still murky.
Moise, in office since 2017, was extremely unpopular. He was accused of corruption, links to brutal gangs and autocratic tendencies.
Opposition parties had already appointed a Supreme Court judge as interim president in February because, in their view, Moise's term had expired.
Protests have repeatedly paralyzed Haiti over the past three years. Most recently, bloody fighting between gangs for control of parts of the capital drove thousands of people to flee.