A key piece of Xcel Energy-Colorado’s clean-energy plan fell into place Friday with the announcement of a long-term deal to develop a solar facility at a steel mill in Pueblo.

Xcel Energy, EVRAZ North America, which owns the mill, and Lightsource BP said they have reached a long-term agreement to develop a 240-megawatt solar array at the mill site. It is expected to start operating by the end of 2021.

Lightsource BP will finance, build, own and operate the $250 million Bighorn solar project and sell all the electricity to Xcel Energy under a long-term power purchase agreement, the companies said in a statement.

EVRAZ, Xcel Energy’s largest power consumer in Colorado, had said it would consider moving out of the state without assurances of low electricity prices. The issue came up after Xcel Energy revealed plans to close two coal power plants in Pueblo early to increase its use of renewable energy.

The Minneapolis-based utility plans to close two units of the Comanche power plant that provide electricity to EVRAZ by the end of 2025, about a decade earlier than originally scheduled. The agreement announced Friday will provide EVRAZ with fixed electricity rates through 2041.

The companies have not disclosed what the rates will be.

“We’re thrilled to partner with EVRAZ North America and Lightsource BP, two companies committed to creating innovative solutions, while developing new solar energy sources within the state,” said Alice Jackson, president of Xcel Energy Colorado. “Working together, we’re benefiting the environment and the local economy by retaining a valued company in southern Colorado.”

The partnership with Xcel Energy and Lightsource BP “will make EVRAZ North America the industry leader in the use of renewable energy to produce the greenest steel and engineered steel products in the world, from rail to rod and bar,” said Skip Herald, president and chief executive officer of EVRAZ North America.

EVRAZ has about 1,000 employees and produces steel for rail, pipes and wire rod. The mill started operating in the late 1800s and was known for decades as Colorado Fuel and Iron Co.

The three companies said the solar project will create about 300 jobs in construction, operations, maintenance and asset management. The agreement requires a final review by the Colorado Public Utilities Commission.

Earlier this year, Xcel Energy took new bids on the project when the original contractor couldn’t do the job for the agreed on price. The project is part of Xcel Energy’s Colorado Energy Plan, expected to boost the utility’s fuel mix to 55% renewable energy by 2026 and reduce carbon emissions by 60%.