Wald Hidala, who had denied plotting to overthrow President Muawiya Wald Sidi Ahmad Taya while standing in an election against him last month, was ordered to pay $1550.
Of the 14 other people on trial, eight others were handed suspended prison terms of two to five years, including Wald Hidala's son Sidi Muhammad. Six people were acquitted and freed.
In a final plea proclaiming his innocence before sentencing, Wald Hidala warned of a civil war in the country.
Mauritania "is in a serious state that could degenerate into civil war if nothing is done to find a solution," said Wald Hidala, adding that "this is meant as advice and not a threat".
Wald Hidallah, a former army colonel who finished a distant second to President Wald Taya in a presidential election last month, was arrested on the eve of the 7 November election.
He was then released, only to be re-arrested immediately after the ballot.
Wald Hidala took nearly 19% of the vote to 66% for Wald Taya, returning the incumbent to power for a third six-year term amid opposition charges of massive fraud.
Advice to president
Wald Hidala, and his then comrade in arms – Wald Taya – were part of a junta that overthrew Mauritania's first president, Muktar Wald Daddah, in 1978.
The retired lieutenant colonel became head of state in 1980, only to be overthrown in a palace coup four years later by Wald Taya.
"Mauritania is in a serious state that could degenerate into civil war if nothing is done to find a solution"
Muhammad Khuna Wald Hidala,
After spending four years in jail, Wald Hidala remained out of the limelight, but he told AFP during the election campaign that he felt compelled to run for president because the country was threatened by instability in the wake of a violent coup attempt in June.
The attempt to oust Wald Taya in June took 36 hours of fighting in the capital Nouakchott to put down. Fifteen people were killed and 68 injured, according to official figures.
During the campaign, Wald Hidala and other opposition politicians attacked the government over persistent social inequalities, the concentration of power and wealth in the hands of a small elite, alleged human rights abuses, cronyism and corruption.
Mauritania, only the third Arab country to establish full diplomatic relations with Israel, is a poor mostly desert nation which hopes to get rich from offshore oil finds.