Canada has ended its evacuation mission out of Afghanistan, leaving some Canadians and Afghan allies stranded, military officials said on Thursday.
Canadian forces airlifted some 3,700 people from Kabul amid the Taliban's rapid takeover this month.
It is so far unclear how many Canadians remain in Afghanistan.
"Our engagement with Afghanistan is not done," Prime Minister Justin Trudeau said, calling the situation "heartbreaking".
Canada will work with allies in the coming months to try and find safe exits for those still in Afghanistan, he said.
The official withdrawal of Canadian forces came just hours ahead of a bombing at Kabul airport.
Mr Trudeau, who is seeking re-election next month, has promised to resettle 20,000 Afghans in Canada in the coming "months and years".
The evacuation efforts out of Afghanistan come amid a snap federal election, called by Mr Trudeau earlier this month.
The Liberal leader has faced criticism from his political opponents on the campaign trail, who have said that Canada did not act quickly enough to get people out of Afghanistan.
Canada's immigration department has received a total of 2,500 applications - covering 8,000 people - under a special immigration program designed for vulnerable Afghans, including those who assisted the Canadian military.
About two-thirds of these applications have been processed and approved, said assistant deputy immigration minister Daniel Mills.
On Thursday Canada also announced an investment of C$50m ($39.6m; £28.8m) in humanitarian aid, in addition to the C$27.3m already allocated.
Canada formally withdrew its military from Afghanistan in 2014, but forces returned in recent weeks to airlift Canadians and allies out of the country.
The evacuation mission relied on the US military's control of the Kabul airport, meaning Canadian forces had to leave Afghanistan ahead of the 31 August US withdrawal deadline.
"We wish we could have stayed longer and rescued everyone who was so desperate to leave," said Gen Wayne Eyre, the acting chief of Canada's defence staff.