OTTAWA -- Two Canadians who served the military in Afghanistan are suing the federal government over alleged discrimination for failing to rescue their family members from the Taliban.

The federal government recently created a program to ensure the families of Canadians who served as language and cultural advisers in Afghanistan are brought to safety.

But the criteria is so restrictive it doesn't apply to some family members who were threatened because of their connection to Canada's military efforts before the Taliban takeover in August 2021.

In their lawsuit, the advisers compare the plight of their family members to that of Ukrainians, who were offered an unlimited number of temporary visas to flee the Russian invasion and work or study in Canada.

Lawyer Nicholas Pope says Ukrainians have been offered better immigration benefits, even though the Afghans he represents are facing just as much danger.

The federal government hasn't yet responded to the court filing, but in a statement earlier this month the immigration department says it has tailored its approaches as the difficult situation has evolved in Afghanistan.

This report by The Canadian Press was first published May 30, 2023.