A knife-wielding man shouting “Allahu Akbar” has attacked police on the Spanish-Moroccan border, injuring an officer, according to Spanish authorities. The attacker was immediately arrested by Spanish law enforcement.

The incident took place at a border post between the Moroccan town of Beni Enzar and the Spanish-controlled city of Melilla on Tuesday, local media reported.

“A man entered the border post and once inside, pulled out a large knife and confronted [police] shouting ‘Allahu Akbar’ [God is Great], slightly injuring a policeman,” Irene Flores, a spokeswoman for the Spanish government’s representative office in Melilla, told AFP.

A spokesman for Spanish police also confirmed the incident to the news agency.

Law enforcement have opened an investigation into the case. The nationality of the attacker has not yet been determined, according to local media.

However, Reuters reported that the attacker is believed to be a Moroccan citizen, citing a source from the local government.

Melilla, alongside Ceuta, is a Spanish enclave located on mainland Africa. The cities are common destinations for African migrants trying to reach Europe. Attempted crossings into the enclaves have resulted in injuries and even deaths.