From the moment Russian tanks rolled into Ukraine in the early hours of Feb. 24, 2022, Ukraine's next-door neighbour Poland pledged its solidarity, sending billions of dollars in military aid and warmly welcoming a flood of refugees.
But 19 months on, Poland's prime minister, who was one of the first leaders to visit Kyiv in the early weeks of the war, announced that the country is shutting down future weapons transfers to Ukraine in the wake of an escalating dispute over grain exports.
Polish officials said the country would honour its current defence contracts with Ukraine and would continue to operate as a transit hub for weapons shipments from other countries, including the U.S.
The rift, driven by domestic fears that a flood of Ukraine grain, diverted from Black Sea ports because of the war, has distorted the Polish market, has exposed the limits of the support of one of Ukraine's staunchest allies.
The policy turn comes as Poland readies itself for what is expected to be a close parliamentary election next month, with the government facing some pressure from opponents who are criticising the continued financial support of Ukraine.
During an interview with the Polish TV channel Polsat News, Prime Minister Mateusz Morawiecki was asked if he could guarantee that Poland would continue to support Ukraine despite the grain dispute.
He replied that the country would no longer be transferring any weapons to Ukraine, because it needed to focus on arming itself "with the most modern weapons."
WATCH | Poland says it will stop sending weapons to Ukraine:
Poland, which shares a long and often contentious history with Ukraine, along with a 530 km border, has been one of the country's biggest supporters through the war.
It has supplied just over $4 billion in military aid, including Leopard tanks, armoured vehicles and howitzers, according to the Germany based Kiel Institute for the World Economy.
"Poland has given about a third of its weapons so far," said Glen Grant, a defence expert with the Baltic Security Foundation who spoke to CBC news from his home in Riga, Latvia.
"When you're not showing the required amount of, I'm going to say. humility and thanks for what Poland has done and you're actually pushing on them, then you can understand it."
Tense relations at UN meeting
During Ukrainian President Volodymyr Zeleknskyy's speech to the United Nations General Assembly in New York on Wednesday, he remarked that the "political theatre" around the grain issue was only helping Moscow.
The tension between the countries first ratcheted up last week when Poland, Slovakia and Hungary announced restrictions on grain imports from Ukraine after the European Commission decided not to extend a ban on sales of Ukrainian grain into five EU countries.
Officials from those nations, which also include Romania and Bulgaria, voiced concern that a surge of Ukrainian agricultural imports into Central Europe would drive down local prices.
Ukraine has resorted to shipping more of its products out of the country by rail, road and barge given that the war has restricted access to its Black Sea ports.
The country has filed a complaint with the World Trade Organization against Poland, Hungary and Slovakia over the import ban, but in a statement released Thursday, Ukraine's farm minister said that after a productive phone call with his Polish counterpart, they "agreed to work out an option to co-operate on export issues in the near future."
After Zelenskyy's address at the UN, Polish President Andrzej Duda, who was also in New York, told reporters Ukraine needed to appreciate Poland's position.
"It would be good for Ukraine to remember that it receives help from us and to remember that we are also a transit country to Ukraine."
Public criticism of Ukraine is rare from Western allies, but those comments weren't the first time that officials have taken issue with some of Zelenskyy's comments.
In July, on the sidelines of the NATO summit in Lithuania, the U.K.'s then minister of defence, Ben Wallace, was asked about Zelenskyy's complaint about not being given a timeline for Ukraine joining the alliance.
Wallace replied that people wanted to see gratitude from Ukraine and stressed that the U.K. and other countries were "not Amazon" and couldn't simply quickly fulfil orders for weapons.
Some allies scale back support
In Poland, the ruling nationalist Law and Justice party has faced some criticism from the far right about the amount of support it has given Ukraine.
And a recent poll suggested that the number of Poles who support allowing refugees from Ukraine in has fallen to 69 per cent from 91 per cent just after the war started, Reuters reported.
But Jarsoslaw Kuisz, the editor in chief of the centrist Polish publication Kultura Liberalna, described the prime minister's comments and the decision to stop sending weapons as "reckless."
He told CBC news that on one level, the decision was a surprise, but it also reflected the current political climate in Poland.
Farmers, Kuisz said, are key supporters of the Law and Justice party and they feel like they would suffer financially if Ukraine's agricultural commodities were allowed into Poland.
The government's statements reflect a "tangible interest in trying not to lose votes from farmers and maybe gain some votes from the far right," he said.
Voters will also soon be heading to the polls in Slovakia, another country bordering Ukraine where populist sentiments are souring on Ukraine.
The former prime minister, Robert Fico, a populist, is touted as a favourite to win in the Sept. 30 vote. On the campaign trail, he has vowed to not send a "single round" to Ukraine and urged the country to negotiate with Russia as the latter will "never leave Crimea."
If he were elected, that attitude would be an outlier among NATO countries for now, but Grant says the worry is that the sentiment might eventually snowball.
"You get one country that says we're not going to do it, and then another one, then another one."
The flip side of that, he said, is that other countries, such as the U.K., might increase their support if they see other NATO allies wavering.
"Will a big crack come and everybody is going to stop supporting Ukraine? For that moment, I don't think so," he said. "The will of the people is still pretty strong."