The United Nations refugee agency has welcomed the response by advanced countries to the Ukrainian refugee crisis and urged them to act in a similar way towards refugees from other war zones, regardless of nationality, race or religion.

The number of people fleeing Ukraine since Russia invaded on Feb. 24 has climbed to more than 3 million in what has become Europe's fastest growing refugee crisis since World War Two.

The vast majority have been welcomed with aid and the possibility of temporary residency and access to employment into countries bordering Ukraine, with a significant number starting to move further west.

Some human rights groups and Arab refugees have contrasted the Western reaction to the way Europe sought to hold back Syrian and other refugees in 2015. Around 12 million Syrians have been uprooted by war.

The U.N. refugee agency told Reuters it was "deeply concerned by rising xenophobia, discrimination and exclusion" against refugees and asylum seekers in recent years and felt the Ukraine refugee crisis provided an opportunity to reflect.

"We welcome this tremendous reception and solidarity exhibited towards refugees in recent days and hope this might inspire some reflection and a shift from some of the toxic narratives and policies we have seen in a number of contexts," said Kathryn Mahoney, a spokesperson for the U.N. High Commissioner for Refugees.

"UNHCR continues to advocate for access to protection for all of those who seek it, including those from Syria, Yemen, Ethiopia and other countries and regions, based on the international obligations of asylum countries to protect refugees."

The agency is advocating for access to asylum for all refugees, she added in an interview this week.

She said the agency was in discussions with countries including Britain, the United States and in Europe over their refugee policies.

"For example, we have repeatedly called for an end to the practice of 'pushbacks' - preventing refugees from entering the territory of a particular country," Mahoney said.

The European Union has said it will grant Ukrainian refugees the right to stay and work in the bloc for up to three years.

Judith Sunderland, associate director for advocacy group Human Rights Watch's Europe and Central Asia division, said refugee policies towards Ukrainians "stand in stark contrast to the policies and practices that we continue to see with respect to migrants and refugees from other parts of the world, most of them brown and Black."

Mahoney said the U.N. refugee agency welcomed the EU's move, adding that there was an urgent need for states to respond similarly to other "serious" and "unresolved" displacement situations caused by humanitarian crises in Afghanistan, Syria and Ethiopia, among others.

"For those asylum-seekers who are not covered by its scope, it is crucial that EU Member States and other asylum countries continue to admit them to their territory, assess individual claims and grant international protection where it is needed," she said.