House Democratic Leader Nancy Pelosi’s husband bought up to a quarter million dollars of stock in a now financially troubled green energy company just weeks before it announced a major 2014 acquisition that sent stock prices soaring, public records show.

SunEdison told regulators last week that it is eyeing bankruptcy under the weight of $11.7 million in debt. But in late 2014, investors were bullish on the company, which manufactures and operates solar and wind power facilities.

Its 2014 purchase of wind energy company First Wind "further bolstered the reputation of the company," wrote one market-watcher at the time. "Perhaps unsurprisingly, SunEdison's stock soared an astounding 29% on news of this acquisition alone."

Pelosi’s husband, Paul Pelosi, had invested just in time. He bought between $100,000 and $250,000 in SunEdison stock on Oct. 24, 2014, according to congressional financial disclosures. The company announced its First Wind acquisition on Nov. 17.

Pelosi’s office did not respond to questions about the timing of the purchase and whether she or her husband had any advance knowledge of the deal.

Pelosi has previously been accused of trading stock based on information gleaned through her official duties. She participated in Visa’s initial public offering as the company fought a House bill to subject credit card companies to increased regulation. The measure failed to pass.

A law passed in the wake of that controversy prohibits members of Congress from using nonpublic information for personal gain. Language in that measure was informally dubbed the "Pelosi Provision."

In addition to her stock trades, Pelosi steered more than $1 billion in federal subsidies to a light rail project that likely improved the value of the San Francisco headquarters of cloud computing company Salesforce, in which her husband had invested up to $1 million.

Paul Pelosi’s stake in SunEdison will likely force the wealthy investor to take a haircut if the company declares bankruptcy. SunEdison’s First Wind acquisition turned out to be a significant part of a larger expansion over the last two years that left the company with unsustainable levels of debt.

On the heels of its First Wind deal, in July 2015, SunEdison announced that it would buy residential power company Vivint Solar for $2.2 billion. Its stock improved on the news, and then began its precipitous decline.

The Vivint deal fell apart in March. The company accused SunEdison of breach of contract, and SunEdison announced that it had been subpoenaed by the Department of Justice over the failed acquisition.

SunEdison has maintained strong a strong presence in Washington throughout its financial woes. The company has spent more than $1 million on its lobbying operation since 2011.

It has employed lobbyists with the powerhouse Podesta Group since 2012, disclosure forms show. In 2015, it brought on 38 North Solutions, a green energy focused lobbying firm. Both firms lobbied to preserve federal tax credits for renewable energy generation.

Pelosi fought for the extension of those tax subsidies in a major congressional deal late last year.

The Podesta Group is run by a top Hillary Clinton fundraiser. Its cofounder chairs her presidential campaign, to which SunEdison donated last year. The company has also donated to the Bill, Hillary, and Chelsea Clinton Foundation.

The son of Ira Magaziner, the chief executive of the foundation’s health policy arm, served as a "clean energy associate" at the foundation before taking a project finance position at SunEdison last year.