San Antonio is now No. 6 in the U.S. for installed solar power, leapfrogging over larger cities in the Midwest and East Coast.

The Alamo City — which was in eighth place last year — now has 161 megawatts of direct current solar power installed, according to the latest Shining Cities report from Environment America. The numbers are through the end of 2017.

Direct current is the power produced by solar panels before being converted to alternating current, which powers homes, and typically is measured at a higher level than AC power due to loss from conversion.

The growth is a 37.6 percent increase over the 117 megawatts of solar that San Antonio had installed by the end of 2016.

“That is the largest growth in the state of Texas in solar and it jumps San Antonio up two places in the rankings from eighth place last year to sixth place this year,” said Luke Metzger, director of the advocacy group Environment Texas, which is part of Environment America.

The latest numbers show San Antonio swapping places with Indianapolis, which had previously been sixth and is now eighth, and pushing past New York City, which San Antonio was ranked just behind last year.

City-owned CPS Energy’s Chief Operating Officer Cris Eugster attributed most of the growth to the utility’s rooftop solar rebate program.

CPS has been pushing for solar installations for years. CPS said recently that at least 88 megawatts of residential and commercial solar power has been installed through its rebate program.

One megawatt can power between 200 and 300 homes in the winter, and 200 homes on a hot summer day in Texas.

The Environmental America report comes nearly a month after CPS released its so-called “flexible plan” that shows it using a growing amount of renewables through 2040. But the utility believes it still will have some amount of coal and natural gas plants in its generation fleet.

The plan generated controversy over its rollout, which came with little warning and left environmental groups concerned about CPS’ community outreach.

Doug Melnick, the city’s chief sustainability officer, said there’s “pretty solid consensus that we need to get to that 100 percent renewable future — the question is how.”

“That’s the hard discussion that’s happening nationally,” Melnick said. “I don’t think any community or utility has figured out how they’re going to get there but I think making that commitment and saying yeah, we need to get there, but that pathway, that’s going to be the discussion we have to have.”

In Texas the only other city in the top 20 was Austin, with 39.4 megawatts of installed solar. Los Angeles supplanted San Diego for the top spot with 349 megawatts of installed solar power.

Dallas had 16.4 megawatts of installed solar, while Houston had 9.5 megawatts of solar power.

San Antonio has the second highest rooftop potential of the top 20 cities by solar installations, with 3,721 megawatts of potential rooftop solar installations. The only city to have more is Los Angeles, with 5,444 megawatts.