China says it will drastically boost its spending on renewable energy over the next four years. The United States, meanwhile, may head down a different path under Trump.

China's energy agency said Thursday it would plow 2.5 trillion yuan, or $361 billion, into clean electricity projects by 2020 as part of a broader effort to shift the nation away from fossil fuels.

Although coal-fired power plants have helped drive China's manufacturing growth in the past decade, the facilities have also created a slew of public health crises, such as dangerous smog in northern China and toxic water pollution.

The country in recent years has started shuttering coal plants near Beijing and scrapped plans for new ones, all the while investing more in alternative sources.

New skyscrapers and high-rise buildings are blanketed in heavy smog in Beijing's Central Business District, Dec. 20, 2016. Image: Lu gang - Imaginechina via ap images

China invested about $103 billion in renewable energy in 2015, about 36 percent of the world's total spending, according to annual global estimates.

By 2020, about half of China's new electricity generation will come from installed solar, wind, hydro and nuclear power projects, the National Energy Administration (NEA) said in its five-year blueprint for the nation's energy sector.

The investment will create more than 13 million jobs in the sector, the NEA said Thursday.

The nation already boasts about 3.5 million jobs in renewable energy, including many at the world's largest solar panel manufacturing facilities, the International Energy Agency found in its 2016 World Energy Outlook.

The United States, by contrast, has about 769,000 jobs dependent on renewables, the agency estimated.

Wind turbines whirl to generate electricity in northwest China's Xinjiang Uygur Autonomous Region, Dec. 25, 2016. Image: Zou jianqi - Imaginechina via ap images

America has similarly experienced rapid growth in renewable energy installations and investment during the Obama administration.

The U.S. public and private sectors together committed $44.1 billion to the sector in 2015 — the highest since 2011 — making America the world's second-largest clean energy investor after China.

Energy analysts say they expect the U.S. will keep building new wind and solar projects under President-elect Donald Trump, largely because the costs of renewables have plummeted in recent years.

Solar power, for instance, is now cheaper than coal in some parts of the world, according to Bloomberg New Energy Finance. In less than a decade, solar may become the lowest-cost option on the planet.

But overall investments in lower-emissions technologies may falter, given Trump's pledge to accelerate U.S. fossil fuel production and his rejection of the mainstream science on climate change.

U.S. President-elect Donald Trump, then a Republican presidential candidate, spoke during a coal mining roundtable in Glade Spring, Virginia, Aug. 10, 2016. Image: AP photo/evan vucci

In December, the Trump transition team suggested it was eyeing large-scale budget cuts at the U.S. Department of Energy, one of the most important supporters of clean technologies in the U.S. and globally.

In an usual questionnaire, which it later disavowed, Trump's team asked how the agency would handle an across-the-board budget cut of 10 percent.

Trump's cabinet picks are also climate-change deniers, and his nominee for the U.S. Environmental Protection Agency is actively fighting to gut the Clean Power Plan, the agency's key policy for reducing power plant emissions.

While Trump may not attack renewable energy itself, his administration's support for fossil fuels may undermine efforts to steer the country away from carbon-intensive coal and natural gas, UtilityDive reported.

"I think it's more likely [Trump]'s going to relax the regulation of natural gas and coal, and that would make it essentially less economic for solar and wind," Brian Potts, a partner at the law firm Perkins Coie, recently told the publication.

If the U.S. backslides on clean energy progress, China and other developing economies like India will likely pick up the slack, in terms of investment and jobs, analysts told Mashable.

But that doesn't mean China's electric grid will suddenly be clean, or that the U.S. will be the only nation that still relies mainly on coal and natural gas for electricity.

China's NEA said it expects renewables will only account for about 15 percent of the nation's overall energy consumption by 2020.

In the next few years, more than half of China's installed power capacity will still be fueled by coal, the agency said.