The opposition Alliance of Change in Mauritius has won all 60 seats up for grabs on the archipelago's main island following Sunday's parliamentary election.
Its leader, Navin Ramgoolam, 77, has been appointed prime minister.
The man he replaces, Pravind Jugnauth, 62, already acknowledged on Monday that his Lepep alliance was heading for a "huge defeat".
Mauritius is known as one of Africa's most stable democracies, but this election was tainted by a phone-tapping scandal, with leaked recordings of public figures posted online.
Ramgoolam, a former doctor, is beginning his third stint as the country's prime minister. He last served between 2005 and 2014.
"The court of the people has delivered its verdict and a new Mauritius awakes," he told supporters.
"We must respect this choice... and we wish the country and the population good luck," said Jugnauth.
The mood in the capital Port Louis reflects this changing tide, as people gathered on Monday in anticipation of results that would signal a fresh direction for the country.
They were dancing and singing in the streets and blowing vuvuzelas. They also waved the country's flag and held fire crackers.
Ibrahim, who voted for the Alliance for Change told the BBC that "growing public dissatisfaction" was a major reason the ruling party lost.
The cost-of-living crisis has been a major issue for many Mauritians, along with a growing concern about governance and corruption.
On the campaign trail, both parties promised to improve the lives of people on the islands.
Ramgoolam - whose father was a liberation hero - said he would increase pensions, introduce free transport and internet and reduce fuel costs.
Mauritius' former foreign minister and a member of the opposition coalition, Arvin Boolell, told the BBC Newsday programme the election was a "victory of the people".
Voter turnout was about 80%, according to the electoral commission.
Citizens went to the polls to elect lawmakers for the 62 seats in parliament for the next five years.
Additionally, up to eight "best loser" seats are allocated to ensure fair ethnic representation in parliament.
The vote comes after a historic agreement in which the UK gave up sovereignty over the Chagos Islands to Mauritius.