Twenty-other people were rescued from the vessel two miles (three kilometres) off Tangiers at around 12pm, Spain's Maritime Safety Agency (MSA) said.
A call alerting authorities about the presence of the boat came in at around 7.30am on Friday at which time the MSA mobilized its Alkaid patrol boat, Spain's El Diario newspaper reported.
The vessel carried out a search in the north of the Strait of Gibraltar and a Moroccan search operation was launched from Tangiers.
The human rights group Caminando Fronteras said eight babies travelling on the boat had died, claiming around 20 people were still missing. However, rescue workers have dismissed those claims.
Search efforts have now been officially declared over, informs Report citing BBC.
Friday's deaths come two weeks after around thirty would-be migrants disappeared in the waters off the southern Spanish city of Almería.
Twenty-nine people were rescued in that incident, but survivors said a further 28 people had been on board. That number included seven babies, according to Spain's Red Cross.
Thousands of migrants fleeing war and hardship try to cross the 15-kilometre Strait of Gibraltar from Morocco to Spain on makeshift boats and inflatable dinghies each year.
Thousands also try to reach Spain by scaling border fences that surround Ceuta and Melilla, two Spanish territories inside Morocco which are the European Union's only land borders with Africa.
Spain's ruling Popular Party has been widely criticized for a recent decision to introduce legislation allowing for the instant deportation of people who enter Spain by climbing over border forces between Morocco and the two enclaves.
The European Union and the United Nations have both expressed concerns that the new rules contravene international laws.