The federal government says a case involving an Ottawa family who believed they were at risk of imminent deportation is a misunderstanding.

David Barry, who has terminal cancer, believed his wife and two children, who are not Canadian citizens, would be deported back to Costa Rica when he died.

The couple's youngest son, Joshua, was born in Canada and is also battling brain cancer.

The ministry says a humanitarian appeal for Jorleny Vargas Campos to stay in Canada has been approved in principal. There is just some remaining paperwork that needs to be filed.

Immigration Minister Jason Kenney's office said Campos and her children are not at risk of imminent removal. The government says the family may not have followed proper procedures in applying for immigrant status.