OTTAWA - The Senate has passed the Conservative government's omnibus anti-crime bill, averting an election showdown over the issue.

The Liberal-dominated upper chamber approved the legislation Wednesday -- just three days before a deadline by Prime Minister Stephen Harper.

Harper had threatened to call an election if the bill wasn't passed by Saturday.

The Senate voted 19-16 for the bill, with all Tories supporting it and many Liberals abstaining.

Liberal Leader Stephane Dion had denounced Harper's deadline as a "juvenile'' effort by the minority Tory government to engineer its own downfall and force voters to the polls this spring.

But Liberal strategists made it clear that they didn't want to give Harper an opportunity to launch an election over the issue.

The legislation is a recycled version of five earlier bills that would, among other things, toughen mandatory minimum sentences for gun-related crimes and strengthen bail rules for people awaiting trial on such offences.

Other sections would raise the minimum age of sexual consent to 16 from 14, beef up laws against drug-impaired driving, and make it easier to declare serious repeat offenders a danger to society and lock them up indefinitely.

Three of the five provisions had already passed the Commons and were in the Senate last summer when Harper called an end to the parliamentary session, making it necessary to start over.

The new version passed the Commons in late November with all-party support.

Opposition critics scoffed at Harper's contention that it was being held up in the Senate, saying the upper house couldn't start detailed study until Parliament returned a month ago from an extended holiday.

The crime bill was among three possible triggers for a spring election, along with the federal budget and a government motion to extend the military mission in Afghanistan.

Dion has now said he won't bring down the government over the budget, and the Tories and Liberals have essentially agreed on a compromise motion on extending the Afghan mission.