Frustrations boiled over Wednesday afternoon after Hungary had sealed the final hole in its border between the two countries a day earlier, closing a popular migration route to Western Europe.
The move left thousands of desperate migrants, most fleeing violence in the Middle East, blocked from entering Hungary by a razor-wire fence. Hungary is a member of the European Union, while Serbia is in negotiations to join the EU.
At Horgos, Serbia, CNN's Ben Wedeman said the standoff had begun peacefully enough, with migrants massing early at the border fence, chanting for Hungary to "open the door."
But tensions rose, with some migrants eventually declaring Hungarian authorities had two hours to open the gate before they would attempt to break through.
When the group followed through on the threat, Hungarian security forces, who had brought in armored vehicles, responded with the tear gas and water cannons.
Screams could be heard as a running battle surged back and forth, with migrants waiting for the tear gas to clear before rushing the border fence again, throwing bottles and rocks at the Hungarian forces. Black smoke rose as migrants set tires afire, and Serbian police implored the crowd to retreat.
Hungary: 'An armed mob'
Hungarian government spokesman Zoltan Kovacs told CNN on Wednesday that Hungarian forces had been driven to respond when young men armed with sticks and stones tried to enter the country.
He said he believed CNN footage of the situation did not give a true picture of events.
"... An armed mob of a couple of hundreds of people are trying to enter Hungarian territory without any kind of permit," he told CNN's Becky Anderson.
"These are young males, armed with sticks and stones who tor(e) away the gate ... during the night, and they are ... trying to break through."
Kovacs said Hungarian authorities were facing "violence on behalf of the mob, an armed mob, who are using kids as human shields."
He maintained that "proportionate police force is being used."
Serbian Prime Minister Aleksandar Vucic told CNN Wednesday that the chaotic situation at the border is a "huge embarrassment for Serbia."
Aleksandar Vulin, Serbia's labor and social welfare minister, said his country had protested to Hungary over the use of tear gas into Serbian territory, while German Defense Minister Ursula von der Leyen told CNN's Christiane Amanpour
that Hungary's treatment of refugees is "not acceptable."
Hungary's conduct was "against ... European rules," she said, adding that refugees had a right to be treated decently.
Hungary is suspending traffic at the border crossing for up to 30 days, according to Serbia's Ministry of Foreign Affairs.
New destination: Croatia
Following the closure of the border with Hungary, throngs of refugees in Serbia are heading west to Croatia as an alternative route into Western Europe.
Their reception from Croatian authorities differed starkly from what they faced in Hungary.
CNN's Ivan Watson witnessed a Croatian police officer greeting migrants by saying, "Come on guys, don't be scared," before they climbed into a waiting police van.
Croatian authorities said they had apprehended 373 foreign nationals, including 75 women and 73 children, for illegally crossing the country's eastern border Wednesday.
They were taken to a registration center outside Zagreb, where they could get treatment and assistance.
Croatian Interior Minister Ranko Ostojic on Twitter pledged to "treat the refugees humanely," while Croatian Prime Minister Zoran Milanovic tweeted his country was "ready to accept people."
"It doesn't matter what religion or nationality they are or the country where they would like to go to," the tweet said.
"These people are here, they want to work, to create. They don't want to come to Croatia nor Hungary, but they will be able to pass through Croatia."
Milanovic, who is set to meet Thursday with Austrian Chancellor Werner Faymann to discuss a response to the unfolding crisis, also had harsh words for the Hungarian government and its blockage of migrants:
"I believe the policy in Budapest of raising walls is dangerous and cruel," he said, according to the Croatian government's tweet. "Wire in Europe in the 21st century isn't the answer but rather a threat."
The danger of landmines
Despite the warmer welcome in Croatia, migrants there could face another threat: landmines.
Medecins Sans Frontieres, one of the aid groups assisting with the refugee crisis, warned about the presence of Balkan landmines.
"Safe and legal routes needed now: #refugees may inadvertently stray into Balkan minefields in search for ways round new border restrictions," tweeted the aid agency, also known as Doctors Without Borders.
The Croatian Mine Action Centre estimates about 51,000 mines are still buried as remnants of the Balkan Wars in the wake of Yugoslavia's collapse in the 1990s.
But the Croatian government said minefields are clearly marked with large signs.
Some of those landmines are close to the Serbian border
-- where many of the incoming migrants would be entering.
Hrvoje Debac, an adviser with Croatia's Office for Mine Action, said the office urges people to stay by the roads and not venture into the woodlands.
Trains to Germany stopped
As European countries continued their scrambled response to the migrant crisis, the German train authority Deutsche Bahn announced Wednesday that trains from Salzburg, Austria, to Freilassing, Germany, will be suspended until midnight Monday.
The move, which Deutsche Bahn described as a "regulatory" issue, comes a day after 180 people jumped off a train.
Someone used the emergency brake to slow down the train before the people jumped off, Deutsche Bahn said.
Salzburg state police spokesman Michael Rausch said migrants may have jumped off the train to avoid newly established control points.
The route from Salzburg to Freilassing is the main rail line for refugees headed into Munich. There are border controls in place in Freilassing so migrants have to register with border police when they cross, whether by car, train or on foot.
Some 1,500 migrants left Salzburg's main train station by foot, moving toward the border with Germany on Wednesday, Johannes Greifeneder, spokesman for the city of Salzburg's press office, told CNN. About 500 migrants remained at the station, he said.
Meanwhile, Austrian Interior Ministry spokesman Karl-Heinz Grundboeck confirmed Austria had started border control measures to the south near Slovenia after migrants appeared to be veering away from the Hungarian border toward Austria.
Slovenia, surrounded by Croatia, Hungary, Austria and Italy, will enforce a temporary border control with Hungary "until a common European solution" is found, Slovenian Prime Minister Miro Cerar said Wednesday via Twitter.
And French Prime Minister Manuel Valls said his country would not hesitate to re-establish temporary border controls if necessary. Border controls had already been reinforced in the past few months in the southeastern French city of Menton, a key crossing for migrants coming from Italy.
Google to match aid donations
With the world facing its biggest migrant crisis since World War II, Google announced it will match the first $5.5 million donated
globally to help migrants, up to a combined $11 million.
The tech giant said the funds will go to Network for Good, which will then distribute the money as needed to Doctors Without Borders, the International Rescue Committee, Save the Children and the U.N. refugee agency.
A massive crisis
More than 430,000 migrants have fled to Europe so far this year, the International Organization for Migration
said. Many are escaping warfare, terrorism and poverty from countries such as Syria, Iraq, Afghanistan and Eritrea.
Migrants typically cross the Mediterranean and try to go through Greece, Macedonia, Serbia, Hungary and Austria before finally reaching Germany or other European countries known to be welcoming to refugees.
The EU is still trying to figure out how to distribute 160,000 migrants -- and whether to set quotas for member countries to absorb them.
That number includes 40,000 from Italy and Greece that the EU had already agreed to relocate. Another 120,000 need placement.
Christopher Tidey, a communications specialist for the U.N. relief agency, said the UNHCR estimates the daily influx of refugees into Macedonia from Greece has been 6,000 in recent days.