This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WARSAW, Poland (AP) — Ukrainian President Volodymyr Zelenskyy won new pledges of military and economic cooperation Wednesday on a state visit to staunch ally Poland, and he also said that Kyiv’s troops battling in the eastern city of Bakhmut could pull out if they face a threat of being encircled by Russian forces.

Polish President Andrzej Duda said Warsaw has provided four Soviet-designed MiG-29 fighter jets to Ukraine, with four more in the process of being handed over and another six being prepared.

At a news conference with his Polish counterpart, Zelenskyy described the perils in the grinding siege of Bakhmut, which has been all but destroyed by eight months of fighting that also has cost many lives on both sides.

“For me, the most important issue is our military,” he said. “And certainly, if there is a moment of even hotter events and the danger that we may lose personnel due to the encirclement, there will certainly be corresponding correct decisions of the general on the ground.”

I n a recent interview with The Associated Press, Zelenskyy underscored the importance of defending Bakhmut, saying its fall could allow Russia to rally international support for a deal that could require Ukraine to make unacceptable compromises.

During his visit to Warsaw — a rare wartime foray out of Ukraine for Zelenskyy — both countries sought to forge a tighter relationship in defiance of Russia’s full-scale war against Kyiv that has reshaped international alliances.

Russian President Vladimir Putin, meanwhile, said Moscow’s relations with Washington are “in deep crisis” as the U.S. has led its allies in supplying aid and weapons to Ukraine. Speaking at a ceremony where he accepted diplomatic credentials from ambassadors of 17 nations, including the U.S., Putin alleged that Washington’s support for the 2014 protests in Kyiv that ousted a pro-Kremlin president led to Russia’s sending troops into Ukraine.

Zelenskyy said at his news conference with Duda that his government would “extend a hearty welcome” to Polish businesses seeking to help Ukraine’s postwar rebuilding, which the World Bank has estimated could cost $411 billion. He met later with Prime Minister Mateusz Morawiecki and signed agreements on developing Ukrainian infrastructure that opens a door for hundreds of Polish companies.

Poland heaped military honors and praise on Zelenskyy as it welcomed him and his wife on a joint visit, during which they thanked the country for its crucial military support as well as being a haven for Ukrainian refugees. The former Soviet satellite that is now a member of the European Union and NATO feels especially threatened by Russia and has been a leading advocate for aid to Kyiv.

Zelenskyy said the countries signed a new defense package for the delivery of Polish weaponry. They will also set up joint manufacturing plants for weapons and ammunition, he said.

Morawiecki said Zelenskyy’s visit was “extremely important because we are shaping the picture of Europe for the future. The Kremlin and Putin, Moscow wanted an end to Ukraine, but today we can see that this war initiates the end of an aggressive Russia, of the Russia that we know, and (marks) a start of a completely new Europe. This is the beginning of a completely new Europe.”

Earlier, Zelenskyy and Duda said they wanted to leave behind any World War II-era grievances that linger in Ukraine and Poland.

“There are no taboo topics between us,” Duda said. “There are still open wounds in the memory of many people.”

While Zelenskyy also traveled to the United States, Britain, France and Belgium, the trip to Poland stood out because it was announced in advance and undertaken without the secrecy of past foreign trips. It also was the first time Zelenskyy and first lady Olena Zelenska traveled abroad together since the war began in February 2022, said Marcin Przydacz, head of Duda’s foreign policy office.

Duda awarded Zelenskyy Poland’s oldest and highest civilian distinction, The Order of the White Eagle.

“We have no doubt that your attitude, together with the bravery of the nation, has saved Ukraine,” the Polish president told Zelenskyy.

At a ceremony in the courtyard of the presidential palace, Duda and the two countries’ first ladies were dressed in formal attire, while Zelenskyy wore the military-style sweatshirt and khaki trousers that have become his uniform since the invasion. His trips to London, Paris and Brussels in February were part of his push for warplanes and for his country admission to the EU and NATO, and his visit to Washington in December was intended to shore up U.S. support.

Both presidents addressed a cheering and flag-waving crowd of Poles and Ukrainians gathered in the Royal Castle yard in Warsaw. A larger gathering watched on screens outside the castle.

Duda and Zelenskyy took on a personal tone as they quoted words from each other’s national anthems and stressed their unity.

“Volodymyr, you are a hero of the free world,” Duda said. “We’re sending a clear message to Moscow, you won’t be able to divide us.”

Duda added that Ukraine alone will decide the conditions on which it would enter any peace talks.

“The only conditions that world leaders should be demanding from Russia are the complete pullout of Russian troops from Ukraine’s territory,” he said. “There is no question of of any negotiations above the Ukrainians’ heads.”

Zelenskyy said the war has brought the two nations together.

“The same way that we are standing together, Poland, in this war, we will be rejoicing together in peace, arm in arm, in everything, together in the European Union, together in NATO,” Zelenskyy said to cheering.

Zelenskyy traveled through Poland on his previous foreign trips, but until now had not made it his sole destination. The country that has been a major cheerleader for Kyiv, a transit hub for weapons and humanitarian aid, and a safe haven for hundreds of thousands of Ukrainians fleeing the war.

The visit highlighted Poland’s rising role in a new international security order emerging from the war. Warsaw wants to modernize its military by purchasing tanks and other equipment from U.S. and South Korean producers. The U.S. has also bolstered its military presence in Poland.

Zelenskyy’s visit came at a delicate time, when Polish farmers are increasingly angry over Ukrainian grain that has entered the country and created a glut, causing prices to fall. The grain is only meant to be stored temporarily before being sent to markets in North Africa and the Middle East, but farmers say it is taking up space in silos and entering Polish markets, causing local prices to fall. Romanian and Bulgarian farmers have the same complaint.

Zelenskyy and Morawiecki said they had reached a deal to resolve the problem but gave no details.

The issue has been a headache for Morawiecki’s government ahead of fall elections, particularly since his conservative ruling party, Law and Justice, gets much of its support in rural areas. Agriculture Minister Henryk Kowalczyk, the focus of the farmers’ anger, resigned Wednesday.

In Ukraine, the military authorities said Russian forces in the previous 24 hours had launched 47 airstrikes, three missile strikes and 42 attacks from multiple rocket launchers. At least four civilians were killed and 16 others wounded in that period, Zelenskyy’s office reported.

Also on Wednesday, the Russian Foreign Ministry accused Ukraine and its allies of trying to affect Russian civilian communications satellites and threatened that Moscow could respond in kind. It didn’t offer any specifics.

Meanwhile, a small plane, apparently from Ukraine, crash-landed in a field in the neighboring Russian region of Bryansk, and its pilot was detained, according to Russia’s Federal Security Service.

___ Associated Press writer Yuras Karmanau in Tallinn, Estonia, contributed. ___ Follow AP’s coverage of the war in Ukraine at https://apnews.com/hub/russia-ukraine