Former military ruler Muhammad Khuna Wald Hidala, seen as the strongest challenger to incumbent President Muawiya Wald Sidi Ahmad Taya, was briefly detained along with five campaign staff on suspicion of plotting to seize power.
"I'm calling on all of my supporters to go and vote tomorrow," Hidala said after his release late on Thursday.
"This is part of the intimidation that the regime has started against us over the past few days," he said, adding he had refused to answer questions without a lawyer present.
All those detained with Hidala were also released.
Friday's poll has been sullied by allegations of foul play and comes just five months after renegade soldiers tried to depose Taya in a coup that was swiftly crushed.
Iron fist: Taya has been in office
for 19 years
Hidala, who grabbed power in 1980 before being ousted four years later by Taya, has assembled a broad coalition of backers ranging from reformist liberals to Islamic hard liners.
Taya, who has been in office for 19 years, has ruled the former French colony with an iron fist and power has never changed hands through the ballot box since independence in 1960.
But he angered some Arabs at home after he performed a stark diplomatic about-turn - shifting from support for former Iraqi President Saddam Hussein to establishing full relations with Israel and moving close to the United States.
During the campaign, diplomats said although Taya remained favourite, for the first time he faced a credible, well-backed opposition which could push the vote to a tense second round.
Taya faces four other challengers including a descendant of slaves and the first woman to run for president in the Islamic republic, a land of nomads and shifting sands.
At his last rally on Wednesday, Taya promised prosperity for his people if they voted for him. Mauritania is a poor country, but many hope for riches from the discovery of offshore oil.
The vast desert state of just 2.9 million people is almost twice as big as former colonial power France but has little more than 800km of paved roads.
"I'm calling on all of my supporters to go and vote tomorrow"
Muhammad Khuna Wald Hidala,
The opposition has accused Taya of rigging past elections and had complained of intimidation during this campaign.
So far this week, the police have searched Hidala's house, seizing two guns, and arrested two of his sons, all moves his camp has said are designed to scupper the election.
On Thursday, witnesses said armed police took Hidala from his house and rounded up five other leading members of his campaign, including a businessman.
The businessman refused to leave his house when the police arrived so they fired about a dozen tear gas canisters into the building, injuring three people, and then stormed the house and took the man away, witnesses said.