The two men and one woman were attacked while delivering supplies to villages along a 240-mile road that links the capital Nouakchott to Nouadhibou to the north, the official said. He asked that his name not be used because he was not authorized to speak to the media.
"The Spaniards were inside their car traveling in the humanitarian convoy which had gone to distribute humanitarian aid to the poorest of the poor of Nouadhibou when the unknown gunmen started shooting at them before kidnapping them," said the official, a top police officer in the capital.
It was unclear whether there were other foreign aid workers traveling alongside of the three, and if so whether they managed to get away.
The official said the workers were employed by the Spanish organization Barcelona-Accio, which does humanitarian work in several African countries, including Mauritania.
Mauritania, once known as a predominantly moderate Muslim nation on Africa's western coast, has been rocked by back-to-back attacks by an al Qaeda linked group.
In 2007, gunmen in Mauritania killed four French tourists that were picnicking on the side of a highway. In 2008, the world famous Dakar Rally auto race was canceled after organizer's received threats of a possible attack.