"We reject the results of the election and we consider that they in no way express the will of the Mauritanian people," said candidate and former prime minister Sidi Mohamed Ould Boubacar in a press conference, adding that he would use "every legal means" to challenge the results.
The electoral commission said Boubacar received 17.87 percent of the vote.
Opposition candidate Baba Hamidou Kane, who is credited with 8.71 percent of the vote, said the four opposition candidates would bring the case to the electoral commission on Monday, and said they have planned protests.
"We will organise protests, this is our constitutional right," said candidate Mohamed Ould Moloud, who got 2.44 percent of the vote, indicating that such protests would be peaceful.
Outgoing President Mohamed Ould Abdel Aziz had hand-picked retired general Ghazouani to succeed him. The electoral commission said Ghazouani received 52 percent of the vote.
Abdel Aziz was prevented from running for a third term in the West African country due to term limits laid out in the constitution.
If Ghazouani is sworn in, this will be the first peaceful, democratic handover for Mauritania since the country gained independence nearly 60 years ago. But Mauritanians fear that Ghazouani's election could set a worrying trend under which military figures or former military leaders become the head of government.
"We are launching an appeal to the Mauritanian people... to resist, within the bounds of the law, this umpteenth coup d'état against the will of the people," said Biram Dah Abeid, an anti-slavery activist who came in second place with 18.75 percent of the vote.
Although slavery was abolished in 1981, slavery is still a major concern, along with lack of freedom of expression, assembly, and freedom of the press.
Abdel Aziz, a general who took power in a coup in 2008, won elections in 2009 and then was elected in 2014 where the opposition boycotted the polls.
Trouble started early Sunday morning after Ghazouani declared himself the winner in front of journalists and supporters.
Fighting broke out on the street with police in northwestern Nouadhibou province after Ghazouani’s declaration. It was the only region where he did not come in first place.
Opposition candidates Abeid and Boubacar said there were balloting irregularities and some party representatives were expelled from polling stations. The national electoral commission said that there had not been any major problem reported.
No foreign election observers were allowed into Mauritania during the polls.
There were 1.5 million eligible voters in Mauritania out of a total population of 4.5 million. Voter turnout was 62.66 percent.
Based on the results, no second-round runoff will be needed.