The contentious budget amendment bill passed 152 to 147 in the House of Commons Thursday in a late-night, snap vote.
In a move that caught the Conservatives completely unawares, Liberal House Leader Tony Valeri proposed a rarely-used time allocation motion in the House of Commons, cutting off debate on Bill C-48.
The motion passed easily. And after an hour of debate, MPs voted on the bill at around a quarter to midnight ET.
It was a gamble that could have resulted in an election call if the Liberals lost. But the absence of several Conservative MPs ensured that didn't happen.
"It bushwhacked the Conservatives. They didn't see this coming," says CTV's Ottawa bureau chief Robert Fife.
The Bloc Quebecois joined the Liberals and the NDP to put the debate on the budget to bed and move onto a vote on same-sex marriage.