Government watchdogs blasted Bill Clinton’s foundation Friday for aiding a for-profit energy-conservation firm partly owned by a blond divorcée who is a close friend of the ex-president.

The Clinton Global Initiative has been previously criticized for receiving donations and grants from governments and corporations that had business before Democratic presidential front-runner Hillary Clinton when she was secretary of state.

But the tax-exempt charitable group’s move to steer funds to a private interest — Clinton pals operating the for-profit Energy Pioneer Solutions — is beyond the pale and may violate federal law, the watchdogs said.

“It really stinks. It is very highly suspicious on its face. This is a company serving products and services, not a charitable purpose. It raises a lot of a lot red flags,” said Matthew Whitaker, a former federal prosecutor who heads the ethics watchdog group the Foundation for Accountability and Civic Trust.

Julie Tauber McMahon, part-owner of Energy Pioneer, is a Chappaqua neighbor and friend of the Clintons. She is also the daughter of Joel Tauber, a millionaire donor to the Democratic Party.

Speculation is rampant that McMahon is the woman dubbed “Energizer” by Secret Service agents because of her frequent visits to the Clinton house when Bill was home and Hillary was away.

McMahon has denied having an affair with the former president.

Other owners of the firm, which was formed to insulate homes in rural America, include Democratic National Committee Treasurer Andrew Tobias and former Democratic congressional candidate Scott Kleeb.

Particularly troubling is that the connection to Energy Pioneer was at one point removed from the Clinton Global Initiative’s Web site in 2010 to hide the link between ­McMahon and the ex-president, sources familiar with the case told The Wall Street Journal.

“It has all the hallmarks of fraud, self-dealing and general corruption,” said Tom Fitton, president of Judicial Watch.

“What else was deleted?”

Another watchdog said laws are not equipped to deal with the overlapping interests of the sprawling Clinton foundation and its principals, which include an ­ex-president and the current Democratic front-runner for the presidential nomination.

“The Clinton foundation’s work, by its nature, blurs the lines between charity, business, politics and public service, making it very difficult to evaluate in a traditional way,” said Sunlight Foundation Director John Wonderlich.

“Our nonprofit laws were designed to create accountability but were not designed to handle a situation like this, where titles like president, presidential hopeful, secretary of state and first lady all blend with fund-raising, board membership and brokering access.”

A foundation rep defended the payout to a for-profit firm as legal and “a common practice in the broader philanthropic space.”