It was just two weeks before the September primary in the state’s third Congressional district, and the latest poll had Lori Trahan in fourth place.

That’s when Trahan poured hundreds of thousands of dollars of new money into her campaign, dramatically increasing her TV advertising from previous weeks. In the closing days of the race, she overtook her rivals, beating second-place finisher Dan Koh by just 122 votes, then going on to easily defeat the Republican candidate in November.

But where did the money for the 11th-hour advertising spree come from?