A loophole in Ontario's campaign finance legislation, now closed, enabled the Progressive Conservatives to fundraise $12.6 million last year -- nearly double what the governing Liberals collected.

The Liberals' decision not to take advantage of the loophole during two of the province's three byelection periods last year cost them dearly.

The Tories, who unapologetically used the loophole to their advantage while they could, raised $7.4 million during those two byelection periods.

The PCs' $12.6-million total wipes out the party's debt, letting them start the year before the election in the black -- as are the Liberals. It also leaves the Tories with a well-stocked war chest at a time when all Ontario political parties face a new fundraising reality that bans corporate or union donations, and prohibits MPPs from attending fundraisers.

Elections Ontario filings also show the province's three major parties reaped the benefits of last-minute fundraising pushes before the rules changed Jan. 1, collecting a total of $2.2 million in the final week of the year alone.

The old rules allowed individuals, corporations and unions to donate $9,975 to a party each year, but they were also allowed to donate the same amount during a byelection period.

The Liberals raised $2.6 million during the Whitby-Oshawa byelection, but after they came under fire for the loophole, they said they wouldn't make further use of it, passing up extra fundraising during the Scarborough-Rouge River vote and the Niagara West-Glanbrook and Ottawa-Vanier byelections. The latter two were on the same day and count as one byelection period for fundraising.

Premier Kathleen Wynne said not taking the byelection donations was a "principled decision." She noted that the total dollar amount raised by the parties doesn't necessarily equate with the amount of voter support.

"If you look at the number of donors and the number of people who are engaged in our party and our fundraising efforts, it far outstrips anything that the Tories have -- like thousands more, so that to me is a really good indication of the interest in the work that we're doing in Ontario and it's very encouraging to me," she said Thursday.

The Liberals saw 5,332 people and corporations make donations under the annual limits in 2016, compared to the PCs' 2,139 annual donors. The NDP, meanwhile, had 9,644 donors under the annual amounts.

The Liberals raised a total of $6.5 million in 2016.

The Progressive Conservatives, meanwhile, raised $3.1 million under the annual amounts, $2 million for Whitby-Oshawa, $3.9 million for Scarborough-Rouge River and $3.6 million for Niagara West-Glanbrook and Ottawa-Vanier. Rules allowed them to continue to collect until three months after the vote itself.

The NDP raised $3.2 million in annual amounts, $53,000 for Whitby-Oshawa, $60,000 for Scarborough-Rouge River and $55,000 for the Niagara and Ottawa byelections, for a total of $3.4 million in 2016.

Under the new rules, the parties get per-vote subsidies to help them stay afloat in at least the first few years without corporate and union donations. The Liberals will get $5.1 million in 2017, while the Tories will get $4.1 million and the NDP will get $3.1 million. The amounts will drop in each subsequent year.

The new rules cap individual contributions to a registered party at $1,200, or $3,600 in an election year. They also ban politicians from attending fundraising events, presenting parties with an additional challenge of raising money without the benefit of drawing in donors using face time with an elected official.

The Liberal government introduced legislation amid a cash-for-access scandal in which it was harshly criticized over fundraising events that saw cabinet ministers attend private, high-priced functions with stakeholders.