The incident comes after bilateral ties were rocked earlier this year when Spain allowed the head of the Western Sahara independence movement into the country for medical treatment.
Rabat considers the head of the movement, Brahim Ghali, a war criminal.
In the note delivered last week to Morocco’s embassy in Spain, the Spanish foreign ministry said the farm “is in Spanish territorial waters” and lacks the “necessary permits”, the source told AFP.
The government is mulling sanctioning against the Spanish firm that supplied and installed the marine cages for the Moroccan company that operates the farm.
The sanctions under study would be for the possible infringement of laws regarding maritime traffic safety and the protection of the environment and marine species, the source added, confirming a report in daily newspaper El Pais.
The Chafarinas Islands are three small rocky islets located some three kilometres off the Moroccan coast and 46 kilometres east of Spain’s north African enclave of Melilla.
There is no civilian population on the archipelago, although there is a small Spanish military station on one of them.
The Chafarinas Islands have been under Spanish control since 1847.
Rabat considers the territory “occupied” by Spain, along with another tiny Mediterranean island known as Perejil in Spain, and Leila in Morocco.
It also labels Melilla and Spain’s other tiny north African enclave, Ceuta, as “occupied”.