U.S. President Joe Biden spoke with top Ukrainian government officials in Warsaw on Saturday during his visit to Poland to show support for the NATO alliance's eastern flank in the face of the Russian invasion of Ukraine.

Biden dropped in on a meeting between Ukraine's Foreign Minister Dmytro Kuleba and Defense Minister Oleksii Reznikov and Secretary of State Anthony Blinken and Defense Secretary Lloyd Austin.

Ukraine had received additional security pledges from the United States on developing defence co-operation, Kuleba told reporters, while Reznikov expressed "cautious optimism" following the meeting with Biden.

"President Biden said what is happening in Ukraine will change the history of the 21st century, and we will work together to ensure that this change is in our favour, in Ukraine's favour, in the favour of the democratic world," Kuleba told Ukrainian national television soon after.

After a separate meeting with his Polish counterpart, Andrzej Duda, Biden called for "constant contact" between the United States and Poland, and reiterated Washington's "sacred" commitment to security guarantees within NATO, of which Poland is a member.

Ukraine is not a member of NATO, and the United States is wary of getting dragged into direct confrontation with Russia, but with the war at the borders of the defence alliance, Washington has pledged to defend every inch of NATO territory.

The White House said that in a speech in Warsaw later on Saturday Biden "will deliver remarks on the united efforts of the free world to support the people of Ukraine, hold Russia accountable for its brutal war, and defend a future that is rooted in democratic principles".

Biden has held three days of meetings with allies in the G7, Europe and NATO, and visited with U.S. troops in Poland on Friday.

In Warsaw, he also visited a refugee reception centre at the national stadium. More than 2 million people have fled the war to Poland, out of the roughly 3.8 million who have left Ukraine all together.

Standing outside, Hanna Kharkovetz, a 27-year-old from the northern Ukrainian city of Kharkiv, expressed frustation the world was not doing enough to help.

"I don't know what he wants to ask us here. If Biden went to Kyiv ... that would be better than speaking here with me," she said as she waited to register her mother for a Polish national ID number.

WARPLANES

President Vladimir Putin's Feb. 24 invasion of Ukraine, which Russia calls a "special operation", has tested NATO and the West's ability to unite.

Poland was until the collapse of communist rule in 1989 behind the Iron Curtain for four decades, under Soviet influence and a member of the Moscow-led Warsaw Pact security alliance. It is now the biggest formerly communist member of the European Union and NATO.

The rise of rightwing populism in Poland in recent years has put it in conflict with the European Union and Washington, but the threat of Russia pressing beyond its borders has drawn Poland closer to its Western neighbours.

Biden's election put the nationalist Law and Justice government in an awkward position after it had set great store in its relationship with his predecessor Donald Trump.

But as tensions with Russia rose before it invaded Ukraine, Duda appeared to seek to smooth relations with Washington. In December, he vetoed legislation that critics said aimed to silence a U.S.-owned 24-hour news broadcaster.

Biden and Duda were exected in their meeting to address a dust-up over how to arm Ukraine with warplanes, and other security guarantees.