Five Spanish opposition parties are challenging the legality of the conservative government's new Public Security Law, known as the "gag law," before the country's top court.

The law, due to come into force July 1, allows for the summary expulsion of migrants caught entering the country's North African enclaves illegally and sets hefty fines for protests outside parliament buildings or strategic installations.

United Nations human rights experts called for it to be repealed.

The opposition group, led by the Socialist party, lodged the complaint before the Constitutional Court on Thursday, saying the bill contains many points that violate the Constitution.

A court spokeswoman said Friday the tribunal will decide whether to study the challenge over the coming weeks. She spoke condition of anonymity in keeping with court policy.