Canada evacuated diplomatic staff from Libya on Tuesday amid growing lawlessness and unrest and after similar moves by other Western nations.
"Due to operational challenges, including the unpredictable security environment in Tripoli, we have authorized the temporary suspension of operations at our office," Foreign Affairs Minister John Baird said.
The United States also shuttered its embassy in Tripoli, while several countries including Britain, France, Germany and Egypt advised their nationals over the weekend to leave immediately.
Fighting between rival militias for control of Tripoli airport and between Islamists and a former general in Benghazi, cradle of the 2011 revolution that ousted dictator Moamer Kadhafi, has killed scores.
Meanwhile an inferno has blazed since Sunday at an oil depot on the outskirts of the capital after a rocket struck a tank containing more than six million litres (1.6 million gallons) of fuel.
There are an estimated 350 Canadian nationals in Libya, according to Ottawa.