While hundreds of thousands of refugees are leaving Ukraine amid Russia’s attack on the country, some Ukrainian men and women are returning home from across Europe to help defend their homeland.

Poland’s Border Guard said on Sunday that some 22,000 people have crossed into Ukraine since Thursday, when Russia invaded the country.

At the checkpoint in Medyka, in south-eastern Poland, many were standing in a line early on Sunday to cross into Ukraine.

“We have to defend our homeland. Who else if not us?” said a moustachioed man in front of a group of some 20 Ukrainian truck drivers walking to the checkpoint to enter Ukraine.

Russia invades Ukraine(PA Graphics)

They came from across Europe to return to Ukraine.

They spoke to the Associated Press (AP) in Ukrainian and in Russian.

Another man in the group said: “The Russians should be afraid. We are not afraid.”

Members of the group declined to give their names, or only gave their first names, citing their security and that of their families.

Denis, 28, who has spent six months working at construction sites in Poland, said he was returning to Ukraine where his “everything” is.

“I’m on my own here in Poland. Why should I be here? So I go, for the homeland,” said Denis, with a small Ukrainian blue-and-yellow national flag on his winter jacket.

“I want to go back to join the army, to fight. We will see, we hope we will win. I want to go back, that’s all,” he said.

Before the recent exodus, there were an estimated one million Ukrainians in Poland, working or studying.

A child is accompanied by a soldier as refugees from Ukraine arrive at the railway station in Przemysl, PolandA child is accompanied by a soldier as refugees from Ukraine arrive at the railway station in Przemysl, Poland (Czarek Sokolowski/AP)

Lesa, 36, from Lviv, spoke to the AP just before entering the checkpoint building, following her brother into Ukraine.

“I am afraid, but I am a mother and want to be with my children. What can you do? It’s scary but I have to.”

Another young woman, Alina, said she was returning to take her children out of Ukraine.

“We have to, we Ukrainians have to take our children away … to allow our boys to fight,” she said.

On Ukraine’s side of the border, a man was directing those arriving to a place where cars and buses were waiting to take them onward.

The Czech Republic, which borders Poland to the south west, is planning to support Ukrainian families living in the country whose men decide to return home to fight.

The Ministry of Labour and Social Affairs is preparing bonuses to families who would lose income if “the men need to join the (Ukrainian) army”, minister Marian Jurecka said.

There are about 200,000 Ukrainian workers in the Czech Republic, the majority of them men.

Police officers direct a convoy of humanitarian aid travelling to Ukraine at the Medyka border crossing in PolandPolice officers direct a convoy of humanitarian aid travelling to Ukraine at the Medyka border crossing in Poland (Visar Kryeziu/AP)

Czech railways said Ukrainian men travelling back to Ukraine can take any train free of charge.

They need to travel through Poland or Slovakia to reach Ukraine.

Ukrainian President Volodymyr Zelensky has stayed in the capital Kyiv, boosting the morale of Ukrainian fighters as Russian troops were closing in on the city and huge explosions lit up the sky early on Sunday.

Mr Zelensky has banned men of military age, 18 to 60, from leaving the country.

Ukrainian authorities have also called on foreign volunteers to come and fight in Ukraine’s defence.

At least 368,000 people have fled Ukraine into Poland and other neighbouring countries in the wake of the Russian invasion, UN refugee agency the UNHCR said on Sunday.

Poland’s Border Guard said some 156,000 people have entered from Ukraine since Thursday, when the invasion started, while some 22,000 have gone in the opposite direction.