SEPTA took a big step toward embracing renewable energy Thursday by approving a contract with a solar farm that will generate nearly 20 percent of its energy consumption in the next two years.

The agreement with Lightsource BP, a San Francisco-based solar power company, is expected to save SEPTA $400,000 on its electric bill every year for the next 20 years, said Erik Johanson, SEPTA’s director of innovation. SEPTA will pay $28.65 per megawatt hour over the next 20 years, a fixed rate that allows the agency to avoid the price peaks from other energy sources.

“We’re not doing any of these sustainability projects just to go green,” he said. “We’re doing them because they make business sense for us.”

SEPTA uses 380,000 megawatt hours a year of electricity for its facilities and the operation of rail and some bus services. Its primary source is Peco, powered by coal, nuclear, and natural gas. SEPTA would like to convert 80 percent of its power to renewable sources by 2050, but that is a target, not a mandate, Johanson said. The transit agency has a policy of embracing green alternatives only when they are the same cost as or cheaper than its current power consumption.

That’s a common attitude, said Kelly Flanigan, global warming solutions associate with the state advocacy group PennEnvironment.

“It’s definitely unfortunate that that is the attitude a lot of people hold, that they’re more concerned about the economy than protecting the environment, but that’s the world we live in,” she said.

Solar technology has improved, though, to become cheaper and more effective, she said, and the industry is booming in Pennsylvania as a result. The state generated about 453 gigawatt hours of solar energy in 2017, according to a 2018 PennEnvironment report, 262 times as much as in 2008. By June 2019, more than 90,000 Pennsylvanians were working in clean energy, according to a report from the national green policy advocacy group Environmental Entrepreneurs — a 60 percent increase from 2014.

“Not only is it better for the environment, it’s becoming more and more affordable,” Flanigan said.

Lightsource BP, one of 20 firms that competed for the SEPTA contract, is also creating a 70-megawatt solar farm for Penn State to provide 25 percent of the university’s energy needs statewide. Philadelphia, meanwhile, agreed last year to draw 22 percent of the power for city-owned buildings from a solar farm in Adams County by 2020.

The solar farm will be built on 87 acres in Franklin County and will serve the transit agency exclusively, generating 71,765 megawatt hours a year. When it’s up and running by 2021, the solar farm will reduce CO2 emissions by 55,750 metric tons, equivalent to more than six million gallons of gasoline being burned in a year — 14.6 percent of SEPTA’s total output of the greenhouse gas.

» READ MORE: Large new solar farm would be built to supply electricity for Philly-owned buildings

Alternative energy sources such as solar farms don’t provide power directly to SEPTA. Rather, they contribute energy to the region’s overall power grid, which then leads to an overall reduction in more conventional energy sources being used.

The move received kudos from environmental groups, including those that have fought SEPTA on its plan to operate a natural gas power generator in Nicetown.

“We commend you and thank you for these significant steps moving toward the goal we continue to challenge you to meet,” said Karen Melton, a representative of the Southeast Pennsylvania chapter of the Sierra Club, at SEPTA’s board meeting Thursday, “a fully electric transit system powered by renewable energy.”

The move was one of three green energy initiatives approved by SEPTA’s board at the meeting.

SEPTA’s headquarters at 1234 Market St. are getting greener, with such energy conservation upgrades as LED lights, solar-controlled window shades, and water efficient fixtures, for $13 million to be provided by Pittsburgh’s Constellation Energy. SEPTA anticipates it will save $18 million.

The board also approved a $16.2 million project to add solar panels to signals along Regional Rail tracks on the Warminster, Doylestown, and West Trenton Lines. The signals, which provide critical route information to train engineers, can be knocked out by bad storms or winter weather, and when they’re out of service, delays and cancellations result. It’s a monthly problem on SEPTA’s tracks, delaying trains by an average of 12 minutes and costing SEPTA about $450,000 a year in repairs.

The new panels, which will be installed within the next 18 months, are designed to kick in if the primary power source is knocked out, giving the signals 48 hours of power independent of the main grid. Eventually, SEPTA may explore using solar panels and batteries as the signals’ primary power source, but in the near term, using them as a backup could result in fewer weather-related train problems.

“We think this is going to be a significant reduction in the amount of outages that are associated with the tripping of the signal power system,” Johanson said.