WASHINGTON --  Two energy companies that gave Democrat Katie McGinty board positions after her days as Pennsylvania's environmental secretary – and have been fodder for Republican attack ads against her -- have  made late donations to her U.S. Senate bid as her campaign against Sen. Pat Toomey (R., Pa.) enters its final days, records show.

Iberdrola USA's PAC contributed $2,500 on Oct. 20, while the PAC for NRG Energy donated $5,000 on Oct. 21, according to disclosures released this week.

That brings the Iberdrola PAC's total donations to McGinty to $7,500, Federal Election Commission records show. McGinty held a $100,000-a-year board position with the Spanish wind energy giant until early 2015.  The NRG PAC donation was its first to McGinty. She earned about $1.1 million from the Princeton-based utility while serving on its board from 2008 to 2013, SEC filings show.

Both companies have figured prominently in Republican attacks, as Toomey has accused McGinty of using her post as environmental secretary in Gov. Ed Rendell's administration to land high-paying board positions with energy companies after she left government. Iberdrola, in particular, has been singled out by Toomey allies because it owned a stake in a turbine-making company that McGinty helped draw to Pennsylvania, and that received significant state aid as it created some 1,000 jobs.

McGinty has said she is proud of her work and has pursued the same goals in her private roles as she has in public life: promoting green energy that helps the environment and creates jobs. There have been no accusations that McGinty's board positions violated state ethics rules.

"Katie has spent her career working to protect the environment and help bring good jobs to Pennsylvania. When she was (Department of Environmental Protection) secretary she brought $1 billion in investment to Pennsylvania and helped create 3,000 jobs," said McGinty spokesman Sean Coit.

He said Toomey, by contrast, has dedicated himself to "working for banks on Wall Street and fighting for banks in Washington D.C., and now they're repaying him by funding his campaign."

McGinty's camp pointed to millions of dollars of campaign support for Toomey from the Club for Growth, the free-market conservative group the senator once led, and thousands of dollars in donations from one-time board members of Team Capital bank, a local bank the Republican co-founded and chaired -- and that Democrats have attacked over its foreclosure practices.

The Iberdrola and NRG donations arrive late in a tight race that is expected to play a key role in deciding who controls the Senate, and as McGinty trails Toomey in campaign cash.

As of Sept. 30 Toomey had $6.2 million on hand compared to $2.4 million for McGinty. Independent political groups, however, have kept the total spending close, with both parties and their allies pouring in some $90 million so far, making the contest the most expensive Senate race in the country.

Both Iberdrola and NRG have made political donations to key figures in both parties and in states across the country.

Toomey, Democrats point out, has also received significant support from industries he has ties to.

The former derivatives trader, who now sits on the Senate banking committee, has received nearly $1.9 million in donations from the securities and investment industry, according to the non-partisan Center for Responsive Politics.

In addition, the political arm of the Club for Growth announced a new $1.9 million ad buy this week, bringing its total spending on the race to more than $3.3 million. The Club also transferred $500,000 to yet another conservative Super PAC, National Horizon, so that group could also spend on the race.

Overall, lawyers and law firms have comprised the top industry donating to McGinty, contributing about $807,000 according to the Center. Groups linked to top Democratic senators have been her biggest outside backers.

McGinty's recent disclosures also reveal support from two more famous and less controversial figures who made late donations: Barbara Streisand gave $1,000 to her campaign as did George R.R. Martin, author of the Games of Thrones series.

You can follow Tamari on Twitter or email him at jtamari@phillynews.com.