A Halifax family is fighting to remain in Canada and say the Libyan civil war delayed their return to this country, hurting their chances of becoming permanent residents.

The case of Ibrahim Fathaly, his wife Manal Miloud Sharef and two of their Libyan-born children was heard before a Federal Court of Canada judge on Wednesday. A lawyer for the family argued they should be allowed to stay in Canada on humanitarian and compassionate grounds.

"If the federal court refuses my case, I don't know what to do," said Fathaly, who currently works as a car technician in Bayers Lake.

"[We] have to leave Canada, but to where I don't know."

The couple also have a third child — who was born in Canada — and Sharef is now pregnant with their fourth.

Canadian law says in order to quality for permanent residency, an immigrant must spend at least 730 days in Canada during a five-year period.

But for the first three years, the family was largely in Libya. Fathaly said the family returned to the North African country for a number of reasons. He needed to build a house for his parents, he was trying to get additional training as an aircraft technician and there was an ongoing lawsuit with his former employer.

He said the family intended to fly back to Canada in time to remain on track for permanent residency.

But Sharef got pregnant and in January 2011 she was told not to travel because of a medication condition. Civil war broke out the next month, trapping the family in Libya.

They finally managed to get out of Libya in June 2011.

'First priority'

After they returned to Canada, the family was ordered removed from the country because they no longer qualified as permanent residents. Fathaly falls 84 days short of the 730-day cutoff. Sharef and the two older children are 113 days short.

That removal order was upheld by a tribunal and on Wednesday, a federal government lawyer urged the court to let the ruling stand.

Sarah Drodge, a Crown attorney, told the court the Fathaly family chose to spend much of the first three years in Libya, instead of Canada.

"If the applicants had a genuine desire to build a life in Canada, then coming here should have been their first priority," she said.

The family was represented by lawyer Scott McGirr. He argued the tribunal made a mistake and did not properly consider humanitarian and compassionate grounds.

"Unique circumstances, beyond the control of the applicants, prevented them from returning to Canada in time to comply with the residency obligation," he said in an interview.

Justice André Scott will make his decision in the coming weeks. He can either allow the tribunal's ruling to stand or send the case back for another hearing.