Commission chief Ursula von der Leyen and Spain's Pedro Sanchez met President Mohamed Ould Ghazouani in the capital Nouakchott for talks focused on border controls and economic development.
"To help Mauritania face challenges in the areas of migration management, forced displacement, as well as security and development, the EU intends to strengthen its financial support," they said in a statement, adding that the EU's Frontex border agency would play a role, without elaborating.
Sanchez also announced up to 200 million euros ($215 million) of financial support from Spain in the next five years to facilitate the development of green hydrogen projects with the participation of Spanish companies.
Migration is set to dominate debate in June's European Parliament elections amid growing anti-immigration rhetoric from right-wing parties.
Mauritania's strategic importance is growing due to the increased migration pressures and instability in the Sahel region.
The number of migrants entering Spain irregularly by sea jumped nearly 300% in January, with the vast majority arriving in the Canary Islands. About 83% of the dinghy boats making it to the archipelago departed from Mauritania, say Spanish officials.
That followed a record number last year who attempted to reach Europe via the Spanish archipelago, which is located off the African coast.
Spain has deployed police officers in Mauritania since 2006, when a large inflow prompted an overhaul of migration policy to put the focus on giving financial and security aid to the boats' countries of departure.
Mauritania, home to fewer than five million people, suffers from widespread poverty and since 2012 has been dealing with the influx of tens of thousands people from neighbouring Mali.
Forum