OTTAWA - The Canadian government is temporarily suspending its consular operations in the Libyan capital of Tripoli and pulling out all staff.

In a statement, Foreign Affairs Minister John Baird and Lynne Yelich, the Minister of State for Foreign Affairs, cite an "unpredictable security environment."

They say Canada's charge d'affaires and Canadian diplomats in Tripoli will temporarily work out of the Canadian embassy in Tunisia.

Libya is witnessing one of the worst bouts of violence more than three years after the downfall of dictator Moammar Gadhafi.

Libya's interim government, which relies on militias filled with rebels who battled Gadhafi's forces for security, now finds itself unable to rein them in.

On Saturday, the United States also evacuated its diplomats from Tripoli to neighbouring Tunisia and shut its embassy.