The results showed that Abdallahi had won 52.85 per cent of valid votes, while his rival Ahmed Ould Daddah, a veteran opposition figure,  took 47.15 per cent.
Turnout was 67.48 per cent.
Abdallahi, 68, an economist and seasoned technocrat who has served in past governments, was seen as favourite to win the run-off after he gained the endorsement of the third- and fourth-placed first round contenders.
He is seen as having the support of members of the outgoing military junta, who had pledged not to interfere with the poll outcome but were expected to keep an eye on the work of the new president.
He is also backed by former supporters of president Maaouya Ould Sid'Ahmed Taya, who was overthrown in 2005.
The results have yet to be endorsed by the Constitutional Council pending possible appeal by the defeated contender.
The vote was hailed by international observers as the freest held since independence in 1960.
They said voting had gone generally smoothly and without serious incidents.