ZAGREB, Croatia — Tensions escalated between Serbia and Croatia on Thursday as the longtime rivals struggled to come up with a coherent way to deal with tens of thousands of migrants streaming through the Balkan nations to seek sanctuary in other parts of Europe.

Serbia banned imports from Croatia to protest Croatia’s decision to close the border to cargo as the two countries criticized each other for their handling of migrants who are traveling through Serbia then on to Croatia on their way to Western Europe. Croatia responded by banning all Serbian-registered vehicles from entering the country.

The increasingly acidic tone of exchanges is reminiscent of that used during the wars that accompanied the disintegration of Yugoslavia in the 1990s, when nationalists on both sides capitalized on the country’s economic collapse and fanned ethnic tensions, touching off a bloody conflict that killed tens of thousands.

“We responded with economic measures without disrespect for Croatian citizens. Within 15 minutes, they responded in a way that reminds us of the events from the 1990s, and we wish to forget that,” Serbian Prime Minister Aleksandar Vucic said. “We will not respond to this, because I simply do not know how to respond to that and stay an honest and normal person.”

Croatia’s move cut Serbia off from many of its main trading partners in Europe. The decision is costing each nation as much as $1.1 million a day.

The tit-for-tat actions underscore the pressure exerted by thousands of people from the Middle East, Africa and Asia who are transiting the Balkans in hopes of making their way to countries such as Germany and Austria.

Relations began unraveling after Hungary closed its border to the migrants on Sept. 15, redirecting the tide of humanity west through Croatia.

Croatia has opened a transit camp in hopes of inserting order into the chaos and to provide the thousands with food, water and medical attention. But people keep coming, and nerves are frayed.

“No one is moving. No one,” said truck driver Dusko Strelja at the border in Bajakovo, Croatia. “The Red Cross is bringing us food here.”

Croatia has shut all but one of its crossings with Serbia to block the migrant surge, which continues unabated after 51,000 people entered the country in little more than a week. Croatia is angry that Serbia is busing migrants to its border, rather than sending them north to Hungary.

Croatian Prime Minister Zoran Milanovic on Thursday accused Serbia and Hungary of colluding.

“I won’t allow that they make fools out of us and that they are sending all (migrants) to Croatia,” Milanovic told reporters.

Even before the present chaos, progress in relations between Croatia and Serbia had been hard-won. A prolonged crisis is certain to add more pressure to such ties.