MEDYKA, POLAND (AFP) - After leaving Afghanistan a year ago, Mr Ajmal Rahmani believed he had found a haven of peace in Ukraine.
This week, he and his family had to flee again - this time to Poland to the sounds of Russian bombs.
"I run from one war, come to another country and another war starts. Very bad luck," Mr Rahmani told AFP shortly after crossing into Poland.
His seven-year-old daughter Marwa clutched a beige-coloured soft toy dog as Mr Rahmani spoke.
Together with Marwa, his wife Mina and son Omar, 11, the family walked the last 30km to the crossing on foot because of the gridlock on the Ukrainian side of the border.
After arriving at Medyka on the Polish side, the family waited with other refugees for a bus that will take them to the nearby city of Przemysl.
Hundreds of thousands of people have fled during the four days of conflict into neighbouring countries, mainly Poland, Hungary and Romania.
While most of the refugees are Ukrainian, among them are also students and migrant workers from further afield, including Afghanistan, the Democratic Republic of Congo, India and Nepal.
Mr Rahmani, who is in his 40s, said he worked for Nato in Afghanistan for 18 years at Kabul airport.
He decided to leave the country four months before the US withdrawal because he received threats and was so scared he kept his children out of school.
Before that "I had a good life in Afghanistan, I had a private house, I had a private car, I had a good salary," said Mr Rahmani.
"I sold my car, my house, my everything. I lost everything," he said. But he added: "Nothing is better than my love, than my family life".
Mr Rahmani said he struggled to get a visa to leave Afghanistan and decided to go to Ukraine because it was the only country that would take him in.
They set up home in Odessa - a Black Sea port city.
Four days ago, when Russia began its invasion of Ukraine, they had to leave everything again and travelled the 1,110km to the border.
Polish authorities said nearly 213,000 people have crossed into Poland from Ukraine since Thursday.
Mr Rahmani and his family, like others without a Polish visa, now have 15 days to get registered, said Mr Tomasz Pietrzak, a lawyer with the Ocalenie (Salvation) Foundation, a charity for migrants.
The timeline is unlikely given the numbers.
"Poland will have to very quickly amend its legislation on this issue," he said.
Mr Rahmani said he was concerned about the future but was encouraged by the warm welcome he received from volunteers and officials assisting the stream of refugees on the Polish side of the border.
"They gave us energy," he said.