Spanish border guards have discovered two migrants hidden inside mattresses strapped to the roof of a car at a checkpoint on the frontier with Morocco, video footage shows.

The footage, published on social media by a senator in the Spanish parliament, is reported to have been filmed in Melilla, an enclave of Spain on the north African coast.

Morocco has become a major gateway into Europe for African migrants.

The latest incident, filmed on Sunday, apparently documented the first time there had been an attempt to smuggle people inside a mattress, according to local media.

Footage was posted on Twitter by Jon Inarritu, a senator from the Basque separatist party EH Bildu.

He tweeted that without a lack of safe ways to seek asylum, incidents such as these would continue to occur on Europe’s southern border.

The video, apparently shot by someone involved in the search operation, showed two men in Guardia Civil uniform lifting two hollowed-out mattresses off the roof of a vehicle and cutting them open to reveal two males inside.

The driver of the vehicle fled to Morocco before being arrested by authorities.

The two migrants were said to be in good health conditions and did not require medical assistance.

More than 6,000 migrants have made it to Melilla and Spain’s nearby Ceuta enclave this year, according to the UN refugee agency UNHCR.

In October, one African migrant died and three others were injured when around 300 stormed the border fence separating Melilla from Morocco.