Two boats carrying illegal migrants on Wednesday were intercepted by a Senegalese navy patrol off the coast of Senegal.
The 338 migrants, which included many young people, as well as women and minors, were then forcibly returned to the Dakar naval base.
The number of attempted migrant crossings to Europe has risen in recent months, with thousands arriving in places like Lampedusa in Italy and Spain's Canary Islands.
The Canaries are a main target for migrants attempting to cross the Atlantic from west Africa.
The Canaries saw 14,976 migrants arrive between January 1 and September 30, an increase of 19.8 percent compared to the same period in 2022, according to the latest figures from Spain's interior ministry.
The migratory route across the Atlantic has become increasingly busy in recent years due to tighter controls in the Mediterranean Sea.
Like the Mediterranean, however, the risks are high, with many boats sunk or missing in 2023.
In August, a boat that left from Senegal sunk off Cape Verde, killing 60.