Moroccan police announced the arrest late on Tuesday of a Spanish citizen and his Moroccan "accomplice" accused of smuggling migrants to Europe by boat.
The suspects allegedly "extorted" people looking to leave the North African country before "illegally" sending them across the Mediterranean Sea in inflatable vessels, the General Directorate of National Security said.
The arrests in the northern city of Tangier came shortly after Morocco's navy opened fire on a speedboat carrying migrants that was being driven by another Spaniard, killing one person and wounding three onboard.
The patrol was "forced" to open fire on the boat after it "refused to obey" orders in waters off the Moroccan locality of M'diq-Fnideq, the authorities said in a statement.
The Spanish captain was arrested unharmed, a local official told AFP.
Morocco - a key route for sub-Saharan Africans trying to reach Europe via Spain - said this month it has foiled 54 000 bids so far in 2018 by illegal migrants to cross the Mediterranean to Europe.
The figures included 7 100 Moroccans for the period until the end of August, according to the Moroccan government.
Since early 2018, Spain has recorded more than 38 000 arrivals by sea and land, according to the International Organisation for Migration.
* Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTER