Canadian diplomatic staff in Tripoli have taken the precaution of working out of an undisclosed location, as Libya faces increasingly intense intermilitia violence that this weekend cost dozens of civilian lives and prompted the U.S. to temporarily shutter its embassy.

A government official said while the Canadian embassy in Tripoli remains operational and is delivering limited services, the "handful" of Canadian diplomats there sometimes work from a location other than the mission, depending on the day-to-day security conditions. The embassy's visa application centre has been closed since July 21until further notice.

Libya was rocked by particularly deadly violence on the weekend, and on Saturday, the U.S. launched a dramatic military-supported evacuation of its Tripoli embassy.

Story continues below advertisement

Countries such as France, Germany, Britain, the U.S. and the Netherlands asked their citizens to leave Libya during the weekend.

A British embassy convoy was hit by gunfire amid an attempted hijacking outside Tripoli on Sunday. No one was injured and the British embassy will remain open but with reduced staff.

Canada's latest advisory, which was updated on July 13 but still valid Sunday, warns against all travel to Libya due to political instability and the threat of terrorism. And while the U.S. said its citizens should "depart immediately" and Britain said nationals "should leave now," the Canadian advisory says people "should consider leaving now while it is safe to do so." The advisory wasn't updated with stronger language as of Sunday evening.

John Babcock, a Foreign Affairs spokesman, said the avoid-travel recommendation, in place since June 1, is the government's highest advisory level. "Advisory levels are continuously being monitored," he added.

At least 36 people, many of them civilians, were killed in the eastern city of Benghazi as Libyan special forces and Islamist militants clashed on Saturday and Sunday, medical and security sources said. In Tripoli, 23 Egyptian workers were killed when a rocket hit their home Saturday during fighting between rival militias jockeying for control of the city's main airport, the Egyptian state news agency reported.

Some 150 people have died in the two cities over the past two weeks, marking the deadliest violence since the 2011 war that ousted Moammar Gadhafi. Three years after his demise, Libya's transition to democracy has been delayed by political infighting and militia violence. The deteriorating situation recently spurred the United Nations Support Mission in Libya and the International Committee of the Red Cross to pull their staff out of Tripoli, while Turkey suspended its diplomatic work there on Friday.

Citing its embassy's proximity to intense fighting between armed Libyan factions, the U.S. took the high-profile step of temporarily suspending operations out of Tripoli and relocating diplomats to neighbouring Tunisia on Saturday. U.S. soldiers escorted a convoy of vehicles out of the city in a five-hour evacuation mission, while F-16 fighter jets and other U.S. aircraft provided security overhead.

Story continues below advertisement

The Canadian and U.S. embassies in Tripoli are several kilometres apart, which could make for vastly different security environments given Libya's "patchwork quilt" of varying levels of violence, said McGill University political scientist Rex Brynen. He also noted American tolerance for risk in Libya is "way, way, way down" since the 2011 attack on the U.S. mission in Benghazi that killed Ambassador Chris Stevens and three other Americans.

On Sunday, shelling continued in Tripoli around the airport, which has been closed since mid-July.

Mr. Babcock said Ottawa is "constantly reviewing the security situation" and takes the safety of diplomatic personnel very seriously. Asked why the embassy hasn't been evacuated while the American diplomats have left Tripoli, Mr. Babcock said the government doesn't comment publicly on security measures at its missions abroad.

A new Libyan parliament was elected in June and Western governments hope warring parties may be able to reach a political agreement when lawmakers meet for their first session in early August.

With reports from Reuters and the Associated Press