Bill C-23, dubbed the Fair Elections Act, passed Tuesday by a vote of 146 to 123.
The bill was virtually universally panned by electoral experts when it was first introduced.
The Harper government eventually modified or removed some of the most contentious provisions — including backing down on plans to eliminate vouching, muzzle the chief electoral officer and create a loophole that would allow rich, established parties to spend untold millions more during election campaigns.
"We introduced a common sense bill, we listened carefully to all the witness testimony and accepted the amendments that were worthy of passage," Democratic Reform Minister Pierre Poilievre said moments after Tuesday's vote.
"And I think the final result is a bill that started off very good and is now in an excellent form as it heads to the Senate."
The Senate's legal and constitutional affairs committee conducted a "pre-study" of the bill last month and recommended nine amendments, which were subsequently incorporated into the amendments accepted by Poilievre. The committee will hold more hearings now that the bill is actually before the Conservative-dominated upper house but is unlikely to insist on more changes.
Conservative Sen. Bob Runciman, chairman of the committee, said he believes the amendments made by Poilievre address the concerns of senators.
"By and large, the feedback I've had from fellow senators has been very positive about the way the minister reacted," he said in an interview.
However, Poilievre's changes weren't enough mollify opposition parties.
"The changes that have been made aren't good enough and if we form government in 2015, we will establish a much fairer principle around elections and repeal C-23," said Liberal Leader Justin Trudeau.
NDP Leader Tom Mulcair, who has led the charge against the bill, said the original bill was "very bad;" with the amendments, he said it is "just bad."
He cited two particular flaws: the provision that would eliminate the use of voter information cards as proof of address and the bill's failure to give the commissioner of elections the power to compel witness testimony during investigations into suspected electoral wrongdoing.
The current commissioner, Yves Cote, has said his investigation into robocalls that misdirected voters to the wrong polling stations during the 2011 campaign was stymied by his inability to compel unco-coperative party operatives to talk to investigators.
It was the furor over robocalls that triggered the bill, although its scope went well beyond dealing with automated phone services used by all parties during campaigns.
Opposition parties maintained the original bill was aimed at tilting the election battlefield in the Conservatives' favour — and much of their criticism was echoed by federal and provincial electoral experts, as well as experts abroad.
The bill has been hugely controversial, pitting Poilievre against the chief elections watchdog, Marc Mayrand, whom Conservatives believe has unfairly targeted their party. Poilievre at one point accused Mayrand of wearing "a team jersey" and, at another point, accused him of wanting more power, more money and less accountability.
Nevertheless, he eventually amended the bill to deal with at least some of the concerns raised by Mayrand.
The most controversial provision involved eliminating the practice of vouching for voters without proper identification. Combined with the ban on using voter information cards to prove one's address, experts said the bill would disenfranchise up to 500,000 voters.
Poilievre ended up retreating from a total ban on vouching. As amended, the bill would allow a voter who has no ID showing an address to have another voter vouch, in writing, for his or her residency.
Also on HuffPost