CAIRNS, Australia – Australia is the world’s second-largest exporter of coal, which plays an outsized role in its economy and politics. But the country has also quietly become a renewable energy powerhouse.

About 1 in 4 Australian homes have rooftop solar panels, a larger share than in any other major economy, and the rate of installations far outpaces the global average. The country is well ahead of Germany, Japan and California, which are widely considered leaders in clean energy. In California, which leads U.S. states in the use of solar power, less than 10% of utility customers have rooftop solar panels.

“The future for New South Wales and indeed the country is one where our energy comes from sun, wind and pumped hydro, not just because it’s good for the environment but because it’s good for the economy,” said Matt Kean, minister for energy and environment in New South Wales.

Australia has limited federal targets to curb carbon emissions, and its prime minister, Scott Morrison, has championed the coal industry, which last year exported more coal than every other country except Indonesia, according to the International Energy Agency.

After the federal government failed to adopt a renewable energy policy in the early 2000s, states began adopting aggressive climate policies and giving homeowners incentives to buy solar panels and, more recently, batteries to store power. Those incentives kick-started the solar boom, and rooftop solar regularly provides about 5% of Australia’s electricity, compared with just under 1% in the U.S.

Despite the growth of solar, Australia’s approach to the electric system has weaknesses, too, as customers face frequent blackouts. Experts blame an unreliable grid, strains on the system from record heat and damage to utility equipment from wildfires.

“One of the bigger challenges that’s arising is that the electricity grid just wasn’t designed and built for high levels of rooftop solar,” said Kane Thornton, chief executive at the Clean Energy Council, the country’s renewable energy industry association. “The grid itself[needs] to be reformed.”

More than half of the roughly two dozen coal-fired plants in operation are expected to be retired within 15 years, and it is not clear what will replace them. While environmentalists want more renewable energy, conservative lawmakers assert that the country needs to keep using coal.

“We’ve got to be realistic when we’re making transitions,” said Warren Entsch, a member of Parliament in the governing Liberal Party, Australia’s equivalent of the Republican Party. “Coal is going to be part of our economy for, I believe, a long time into the future.” Entsch is a special envoy to the Great Barrier Reef, and he only recently acknowledged that climate change was the primary threat to the reef.

However, Kean said Australia had to make its electric system more reliable, reduce costs and address climate change with the help of solar, wind, batteries and other renewable technologies. “This is the economically rational position to take,” he said. “Those people arguing for coal, gas and nuclear are actually arguing for more expensive, dirtier energy. The future is not those things.”