Two Belgian police officers have been briefly detained by their French colleagues as they returned a group of migrants to French soil, an incident that caused tensions between the neighbors.

French authorities in northern France said the two policemen were arrested on Tuesday after they crossed the border near the town of Nieppe. They were transporting 13 migrants.

A spokesman for France's northern department of Nord said in a statement on Thursday that "French authorities have expressed their utter disapproval following this initiative which does not comply with the usual working practices between France and Belgium."

The two police officers were released after being interviewed by French police, while the migrants — including three minors — have been kept in custody for checks.

According to Belgian media, the undocumented migrants were detained Tuesday on Belgian territory. The country's Office of Foreigners ordered them the same day to leave the country, and Belgian police took the migrants at their request to the Belgian-French border at Nieppe and dropped them off there.

In escorting one group, Belgian police inadvertently drove 50 meters (yards) into French territory.

Georges Aeck, a police captain in the Belgium town of Ypres, said the two Belgian officers drove the migrants back to the border because they "did not want to leave them by the roadside and let them walk to the border."

Vincent Gilles, the president of Belgian police union SLFP, criticized French police for keeping his colleagues at the police station for about four hours without a lawyer or an interpreter.