The man was detained after a video posted on social media showed a jeep pulling a trailer along a dirt road in northern Greece, and he can be heard asking another person to open its doors. Two migrant men can be seen crammed inside the trailer.

"Get organised, let's all go out and round them up. They will burn us...," the man, who police said is a foreign national, can be heard saying in Greek in the video.

In a statement late on Tuesday, police said the man, who owns the vehicle, had illegally detained 13 Syrian and Pakistani migrants. Two Greek nationals who allegedly helped him were also arrested.

The three were expected to appear before a prosecutor on Wednesday, after which it will be decided if they are formally arrested and charged.

A police official, speaking on condition of anonymity, said the 13 migrants had also been detained for entering the country illegally.

The semi-official state news agency ANA said a Supreme Court prosecutor has ordered an investigation into the video. In a document published by ANA, the prosecutor is quoted as saying: "Phenomena of racist violence against immigrants are worrying."

She described the video as "a racist delirium of violence, accusing immigrants of 'burning us' and inciting others to racist pogroms, calling on them to organise and imitate him".

Major wildfires have broken out in Greece in recent days, with the biggest front in the northern region of Evros bordering Turkey, from where migrants typically cross into Greece via the river separating the two countries.

The burned bodies of 18 people, believed to be migrants, were found in a rural area in the region on Tuesday.

(Reporting by Karolina Tagaris and Lefteris Papadimas, editing by Mark Heinrich)