Environment Minister Catherine McKenna says it is "unfortunate" that a disagreement with the Philippines about Canadian garbage became an international diplomatic incident but she hopes it's created an opportunity for Canada to tackle its plastics-pollution problem.

"This is the reality that developing countries do not want to have any more of the plastics or trash of developed countries," she said. "It's unfortunate that it got raised to this level but we are committed to getting it back."

Next month, McKenna intends to unveil a national plastics-pollution plan that is expected to put more onus on plastics producers to ensure their materials are recycled or reused.

McKenna said Thursday she was "cautiously optimistic" the saga over the garbage in the Philippines is nearly at an end, as the 69 remaining containers of Canadian household waste that ended up in the Philippines under false pretences five and six years ago were loaded onto a container ship in the port of Subic.

"I'm waiting with bated breath. These containers are all getting loaded, they've all been fumigated and I am cautiously optimistic but until I see the last container on the ships I will not get too excited," she said.

The last container was put aboard the MV Bavaria shortly after 3 a.m. in the Philippines. The ship should take about four weeks to get to the Port of Vancouver. Once back in Canada the garbage will be burned at a waste-to-energy facility in Burnaby, B.C.

The returnees are the leftovers of 103 shipping containers that arrived in Manila and Subic in 2013 and 2014, falsely labelled as plastics for recycling.

An inspection revealed they were mostly filled with regular garbage, including electronic waste and dirty diapers.

Philippine Foreign Secretary Teddy Locsin posted video and photos to his Twitter account showing the containers being loaded throughout the afternoon and into the wee hours of the morning in Subic, a major international port northwest of Manila. He also showed a Canadian Embassy official monitoring the process.

Locsin suggested there were last-minute problems getting international shipping permits in place, saying the Philippine environment minister was "up early" and "begged for foreign transshipment permits" while Canada's ambassador John Holmes "never slept 'til it all got done."

McKenna also said there "were some challenges."

Locsin's social-media presence has peppered the ongoing dispute with colourful commentary, much in line with his boss, Philippine President Rodrigo Duterte, who in April threatened to declare war on Canada if it didn't finally take back its trash. Duterte also said he would ship it back himself if he had to, a threat his government reiterated when Canada missed a May 15 Philippine deadline to get the garbage on a container ship.

Ultimately, however, Locsin worked with Canada to get the necessary work done as quickly as possible, a Canadian official said, asking not to be identified because he wasn't authorized to speak publicly on the matter. The containers had to be inspected, cleaned and fumigated before being loaded on the boat.

Canada hired French shipping giant Bollore Logistics to handle the shipment, issuing a $1.14 million contract.

Aileen Lucero, national co-ordinator of the EcoWaste Coalition in the Philippines, which spearheaded protests against the Canadian garbage, said she feels "jubilant" that the trash is finally leaving her country.

"The Philippines is not the world's dumpsite," she said. "Never again shall we allow other countries to trash our dignity, our people's health and the environment."

The garbage was sent to the Philippines by a now-dormant Canadian company but the origin of the garbage, and where in the supply chain the lies about the contents began, have yet to be sorted out. The former Conservative government spent more than two years trying to convince the Philippines to dispose of the trash there, and in July 2015, the contents of 26 of the containers were dumped into a local landfill.

That stopped when local environment groups objected. The Liberal government inherited the problem in November 2015 and spent the last three-and-a-half years also trying to find an alternative to bringing it the garbage the way back to Canada. In April, when Duterte kicked up the heat on the matter with his hyperbolic war threats, Canada backed down and agreed to bring the containers' contents home and pay all the costs.

The diplomatic nightmare has also become a symbol of the shadiness of the global recycling industry, which sees millions of tonnes of plastics meant for recycling ending up in garbage dumps and incinerators overseas. The problem grew in the last year after China — once the world's biggest importer of plastic waste for recycling — slammed shut its doors to the materials because most of it was too contaminated to be useful.

Canada says it now has regulations that would prevent Canadian companies from sending trash to unsuspecting countries but Malaysian officials this week said there are 60 containers of foreign trash in its ports that it wants sent back to their origins, including one from Canada. Canada is investigating that claim.

"It is grossly unfair for rich countries to send their waste to poor countries simply because poor countries have no choice and maybe it contributes a little to their economy," Malaysian Prime Minister Mahathir Mohamad said at a news conference during a visit to Japan Thursday. "We don't need your waste because our own waste is enough to give us problems."

— with files from The Associated Press