Updated

Migrants on the Greek-Macedonian border attacked police with stones Saturday, enraged by the sight of Macedonian authorities erecting a fence along the border and an accident that injured a young Moroccan man.

Authorities said 18 Macedonian officers were injured in the brief but intense clashes. Most of them received minor injuries but two were hospitalized in the nearby town of Gevgelija, Macedonia's Interior Ministry said.

There was no official tally of injured migrants, although Macedonian police targeted them with stun grenades and plastic bullets. Doctors from the Red Cross and other non-governmental organizations said they treated 20 people for head injuries and breathing problems.

The accidental electrocution at the top of a train carriage of a 24-year-old Moroccan, who suffered severe burns, sparked the unrest among the migrants, many of whom have been stranded at the border since Macedonia decided earlier this month, along with Serbia, Croatia and Slovenia, to let through only those from the "warzone" countries of Afghanistan, Iraq and Syria.

More than 600,000 refugees and other migrants from the Middle East, Africa and Asia have entered Europe through Greece this year, many after making the short sea crossing from Turkey. Most of them continue on a long trek through the Balkans toward the promised lands of central and northern Europe.

The 24-year-old is in a serious condition, with extensive burns, Greek police said, and has been transferred to a hospital in the city of Thessaloniki, 80 kilometers (50 miles) south of the border.

The man's Moroccan compatriots formed the bulk of the about 250 people who started throwing stones at Macedonian police. Also among the 800 who are stuck at the border are citizens of Algeria, Tunisia, Lebanon, Yemen, Iran, Pakistan, Bangladesh, Somalia and Congo.

Greek police didn't intervene to stop the migrants but did, at one point interpose themselves to protect their Macedonian colleagues, as the migrants would not target the Greeks.

The clash ended in less than an hour when other migrants intervened, holding white clothing as a sign of peace.

Macedonian government spokesman Aleksandar Gjorgjiev told The Associated Press that the country has started to erect a fence on its southern border with Greece in order to prevent illegal crossings and to channel the flow of migrants through the official checkpoint.

Gjorgjiev said "the border will remain open and all migrants from the war-affected zones will be allowed to enter."

The migrants are camped along the railway tracks, blocking rail traffic for the 11th consecutive day.

"I have been here for 10 days with my two sons. We have decided to return to Athens and see what we will do," said 41-year-old Fatemeh, from the Iranian city of Ahwaz. She declined to give her last name, for fear of reprisals.

"There is no way to return to Iran, only prison awaits us," she said. "We understand that the Syrians, the Afghans and the Iraqis are at war, but we also have a big political problem. There is no freedom in our country."

___

Testorides reported from Skopje, Macedonia. Demetris Nellas contributed to this report from Athens, Greece.