Canadians have narrowly avoided a trip to the polls.

It comes after the federal Liberals survived a confidence vote this afternoon with the support of Green and NDP MPs.

The 180-146 vote saw a motion by the Conservatives to create a new committee to probe alleged Liberal corruption in the WE scandal defeated.

The Liberals had declared the vote a matter of confidence and if successful it could have triggered an election.