Morocco has suspended all flights between Moroccan cities and Libya and closed its airspace to Libyan airplanes because of security concerns, the Moroccan government said on Monday.

Morocco's Royal Air Maroc had already suspended its flights to Libya in July when Libyan factions started to fight over the control of Tripoli's airport. But some Libyan carriers were still operating between the two countries.

The government statement did not specify the security concerns in Libya, where Egyptian jets bombed Islamic State positions on Monday, a day after the group there released a video showing the beheading of 21 Egyptian Christians.

"The temporary suspension was dictated by the nonconformity of the flights departing from Libyan airports to the international standards" a statement from the Interior and Transportation ministries said.

Morocco has also decided to close its airspace to all Libyan airplanes, it added.

Three years after the fall of strongman Moammar Gadhafi, Libya has turned to a violent power struggle between rival factions who have installed competing governments.

Militant groups, including movements linked to Islamic State, have also won ground in different areas of the country.