“With this court approval we can move forward with this exciting agreement that reaffirms NRG’s commitment to renewable energy. We’ll continue working with SunEdison, its clients, stakeholders and regulators to close the transaction,”  Craig Cornelius, head of NRG Renewables, said in a statement.

The US Bankruptcy Court for the Southern District of New York, which is overseeing SunEdison’s Chapter 11 bankruptcy proceedings, is due to post the judge’s decision later Thursday.

The transaction is still subject to regulatory approvals.

New Jersey-based NRG executed a purchase and sale agreement (PSA) that would provide total consideration up to $188m. This comprises an initial $129m payment and another of $15m upon completion of designated power off-take deals for certain assets in development.

Final payments up to $44m are contingent on achieving other development milestones.

The PSA includes the 200MW Buckthorn PV project in West Texas whose capacity is fully contracted and construction-ready.

Last year, Buckthorn gained national attention when SunEdison signed a 25-year PPA with Georgetown, helping it become the first city of any appreciable size in oil-drenched Texas to embrace renewable energy for all its power needs.

That decision was even more notable as city officials and residents are largely conservative Republicans, who generally oppose President Barack Obama’s climate-change and environmental initiatives.

SunEdison’s law firm Skadden had earlier noted in a court filing that the project faces a series of benchmarks to obtain construction financing and meet contractural terms for delivery of power.

Under the PSA, NRG would also acquire an interest in a structured partnership owning 683MW of “nearly complete, fully-contracted” PV assets in Utah.

The other 1.25GW of solar and wind assets in various stages of development in California, Hawaii, Maine and Washington.