This story was originally published by Mother Jones and is reproduced here as part of the Climate Desk collaboration.

Before becoming the controversial campaign manager of Donald Trump’s presidential bid, Corey Lewandowski oversaw the New Hampshire chapter of Americans for Prosperity, the advocacy group founded by the Koch brothers. The conservative activist, who was charged with battery on Tuesday, led an aggressive operation dedicated to slashing government spending — including earmarks and subsidies — and eviscerating government regulations, particularly the green-energy agenda of the Obama administration. Yet Lewandowski led something of a double life, because while he was battling the government for AFP, he was also working as a lobbyist and seeking federal funds for clients that included a solar power company.

Reader support makes our work possible. Donate today to keep our site free. All donations DOUBLED!

In June 2008, when Americans for Prosperity set up a new chapter in New Hampshire and tapped Lewandowski as its head, the group declared that it intended to bolster conservative politics in New Hampshire and noted that it was “a leader in the fight against pork-barrel earmarks and economy-destroying policies being advanced in the name of global warming.” Known as a hard-charging political brawler, Lewandowski had been drifting through the political world before joining AFP. He had been an administrative assistant to Ohio Republican Rep. Bob Ney (who was later jailed on corruption charges), served a brief stint as legislative director for a regional branch of the Republican National Committee, and worked on Sen. Bob Smith’s failed Senate reelection bid in New Hampshire.

While running AFP’s New Hampshire operation, Lewandowski had at least two other jobs. From 2006 to 2010, he served as a marine patrol officer trainee, working on a seasonal basis with the state law enforcement agency that patrols New Hampshire’s lakes and seacoast. He also was a registered federal lobbyist employed by Schwartz Communications, a Massachusetts-based public relations firm.

Grist thanks its sponsors. Become one.

As he played a prominent role at AFP stoking Tea Party anger over government spending and President Obama’s agenda, Lewandowski represented three clients for Schwartz Communications: Passport Systems, a company that manufactures radiation detectors for ports; Logical Images, a firm that makes healthcare software; and Borrego Solar, a California-based corporation with offices in Massachusetts that designs and installs solar power systems.

According to federal filings, Lewandowski lobbied on various appropriations bills, suggesting that he was striving to obtain government contracts and subsidies for his clients. In one case, he helped to land a lucrative earmark for the type of solar power project he publicly has criticized as government waste.

In 2009, AFP was sponsoring anti-Obamacare protests and opposing a cap-and-trade program designed to counter climate change. Meanwhile, Lewandowski, according to disclosure forms, was lobbying members of the House and Senate on behalf of Borrego Solar in connection with the 2010 Energy and Water Appropriations Act, a $33.5 billion spending bill that financed major energy and water infrastructure projects. In early 2009, as the bill was under consideration, Lewandowski escorted a group of Borrego executives to Capitol Hill for meetings with lawmakers, including Rep. Nikki Tsongas (D-Mass.). Tsongas — whose office confirmed the meeting with Lewandowski — later inserted a $500,000 earmark into the appropriations bill for a major solar electricity project in Lancaster, Mass., that involved Borrego.

Orlando Pacheco, who at the time was town administrator for Lancaster, recalled that Lewandowski was an important part of the team that brought the project to fruition. “All I can say is all those involved have made an incredibly long-lasting impact on Lancaster,” Pacheco said. “All those people involved, Mr. Lewandowski, Congresswoman Tsongas … that project is really the only one of its kind in Massachusetts, and we would not have been able to pull it off without their help, and I’m deeply appreciative.”

Grist thanks its sponsors. Become one.

Lewandowski’s firm, Schwartz, later declared on its website that it had helped Borrego secure “federal government financing for a solar project during the depths of the financial crisis.” But the company ultimately ended up backing out of the project, which continued without Borrego’s participation. A Borrego Solar representative declined to comment.

Though he had succeeded as a pro-solar lobbyist looking for government assistance, at AFP he waged a campaign against government programs that supported green energy. In early 2011, Lewandowski penned an op-ed for the Concord Monitor in which he railed against a regional program that sought to address climate change by spawning investment in green-energy projects. And, with AFP’s president, Tim Phillips, Lewandowski cowrote another op-ed condemning green energy and the government policies, including subsidies and grants, that support the industry:

In reality, the subsidies keep taxes high on productive companies while politicians get to pursue their favorite pet projects, all while energy prices continue to rise … Obviously it’s time for lawmakers to realize that if a new technology truly has worthwhile benefits for American consumers (lower cost, higher efficiency, environmental benefits, or otherwise) then that technology will demonstrate its value by competing for consumers’ dollars in the open market — not by gobbling up special handouts from their pals in Washington.

And AFP targeted government grants to the green energy industry as part of its anti-Obama crusade, launching a fusillade of television ads accusing Obama of handing out irresponsible grants to California-based solar technology company Solyndra.

In addition to Borrego Solar, Lewandowski’s other clients landed lucrative government funding while he represented them. Passport Systems secured more than $23.9 million in federal dollars between 2008 and 2011, according to a federal contracting database. In the six years Lewandowski represented Passport Systems, it paid his firm more than $350,000.

Lewandowski was paid $40,000 in 2009 for his lobbying work for Logical Images. In recent years, the company has sold more than $6.5 million worth of software to the federal government. (Art Papier, the company’s CEO, says Logical Images hired Lewandowski’s firm to do PR work and that he wasn’t aware any lobbying was done on the company’s behalf.)

Lewandowski did not respond to a request for comment.