Three Frenchmen were arrested in the Moroccan city Sale close to Rabat on suspicion of financing terrorism and connections with militant groups, police said.
Investigations showed the suspects had connections with Islamic State (IS) fighters in the Middle East, a statement carried by state news agency MAP said.
The suspects were arrested on Monday and were not identified but the police statement said one is of Algerian origin.
Compared with other countries in North Africa, Morocco has been largely insulated from militant attacks.
The four main suspects arrested in connection with the December killing of two Scandinavian women near Marrakech pledged allegiance to IS in a video.
In April 2011, 17 people died when a restaurant in Marrakech was bombed.
In 2017 and 2018, Morocco said it dismantled 20 militant cells planning attacks in the country.