A top U.S. Treasury Department official cautioned counterparts at the Energy Department that their plan to help a failing solar-power company, Solyndra LLC, by restructuring its $535 million federal loan could violate the law and should be cleared with the Justice Department.

The Treasury Department's assistant secretary for financial markets, Mary Miller, emailed a White House budget deputy director in August expressing her concerns, according to excerpts released Friday by Republican members of a House of Representatives committee investigating the federal loan to the failed company. Her email was sent two weeks before the company announced its intention to file a petition for relief under Chapter 11 of the U.S. Bankruptcy Code on Aug. 31. Solyndra offices were subsequently raided by the FBI.

When Solyndra ran out of cash, the Energy Department in February agreed to a plan to restructure its debt. As part of the restructuring, $75 million in private investment would have been ranked ahead of the public investment in the event of bankruptcy. That private investment was tied to a leading Obama fundraiser.

The way the federal involvement with Solyndra worked, the Energy Department guaranteed and monitored the loan, which was provided by the Treasury Department's Federal Financing Bank.

The emails show Miller wrote to Jeffrey Zients, deputy director of the White House Office of Management and Budget, expressing concerns that the Energy Department had not asked Treasury to review the loan restructuring as required. Miller said the deal could violate federal law because it put the interests of investors ahead of the interests of taxpayers.

The House Energy and Commerce Committee has asked the Treasury Department to turn over all documents related to the Solyndra loan guarantee.

The probe has become a political headache for the Obama administration since it has defended decisions made on the $535 million loan guarantee under a program designed to spur clean-energy technology, according to Reuters.