Hidala, 63, was the main challenger in Friday's presidential elections in which President Muawiya Wald Sidi Ahmad Taya won a third term.
According to a witness, police arrived in force during the night and surrounded the building. They then waited until Sunday morning before arresting him.
The arrest was confirmed by a member of Hidala's campaign team.
The opposition leader went into hiding for part of Saturday, saying he feared being rearrested after the election result was announced.
He and members of his campaign staff had been briefly detained on the eve of the election and accused of preparing to mount a coup.
The 62-year-old Taya received more than 66% of the vote in Friday's election, according to final official results issued by the interior ministry. Hidala was credited with slightly under 19%.
The opposition rejected the result and called for a new vote.
In a statement, it said it planned to file proceedings with the constitutional council to challenge what it called an "electoral hold-up".
"We are going to use all legal means to resist this masquerade," Hidala said.
The run-up to the poll in this coup-prone nation, where power has never changed hands at the ballot box since independence from France in 1960, was tense.
"Those in power don't want to share it. This is a pseudo democracy," said Shaikh Faad Bu Kamara, head of the Mauritanian Association of Human Rights and a sociology professor.
Taya overthrew Hidala to seize power in 1984. He was elected in 1992 with 63% of the vote and re-elected in 1997 with 90% in a poll boycotted by the opposition.
He now has another six-year mandate.