This article originally appeared on the Motley Fool.

According to the latest reports, U.S. President Donald Trump is set to withdraw from the Paris climate accord within days. Despite opposition to this move from some within his administration, most notably Secretary of State and former CEO of ExxonMobil Corporation (NYSE:XOM) Rex Tillerson, Trump seems dead set on living up to a campaign promise to exit the landmark climate agreement. 

If he does indeed follow through, the repercussions will be felt not only across political lines around the world and have potential implications on global efforts to combat climate change, but it will also have repercussions for investors in the energy industry.

The losers could be surprising, with U.S.-based shale producers including EOG Resources Inc. (NYSE:EOG), Continental Resources, Inc. (NYSE:CLR), and Pioneer Natural Resources (NYSE:PXD) exposed to the downside of falling oil prices, while oil-field service companies such as U.S. Silica Holdings Inc. (NYSE:SLCA) and National Oilwell Varco, Inc. (NYSE:NOV) are set to benefit from big spending increases in oil and gas production. 

Furthermore, solar panel manufacturer First Solar, Inc. (NASDAQ:FSLR) appears to be in excellent long-term shape no matter what direction the U.S. goes with the Paris accord. Keep reading to learn more about what's happening and why these stocks will either win or lose from Trump's decision. 

Sending a signal that the U.S. is doubling down on oil

After falling off sharply in late 2015 through the first half of 2016, U.S. oil production has been steadily increasing over the past year:

c9190f54ff57ce3425a55314a6c99a66 U.S. CRUDE OIL FIELD PRODUCTION (4-WEEK AVERAGE). Photo: The Motley Fool

Even with oil prices still down by half from the peak, improvements in well development productivity have enabled U.S. producers to make money at much lower oil prices. This single factor has powered the recovery in onshore production, and experts anticipate output will continue growing. The U.S. Energy Information Administration expects U.S. oil production to approach 10 million barrels per day by 2018 -- a big jump from less than 9 million barrels per day in 2016. 

Independent onshore oil producers are driving much of this growth. Small producers are on track to spend a whopping 51% more in the oil patch this year, budgeting a combined $53 billion largely for production growth in 2017. 

This could make independent oil producers the losers in the near term

Even with expectations that U.S. oil output is already set to grow, an exit from the Paris accords is likely to send a signal that the Trump administration is doubling-down on domestic fossil fuels, even as fears of carbon emissions from human activity have the rest of the developed (and much of the developing) world taking steps to move away from oil.Oil prices have already fallen recently on fears of a growing global oil glut. 

U.S. producers have done a remarkable job of cutting production costs. In its most recent earnings report, EOG Resources said that its return target for new wells is 30% after tax at $40 oil, while Pioneer's internal rate of return expectations is for 50%-100% after tax with oil at $55. Continental has also made big strides, and management says that they are on track to operate cash flow breakeven with oil between $55-$60, even after a big increase in capital spending this year. 

But it's far from certain that U.S. producers will realize those prices in the near future. West Texas Intermediate crude futures fell to $48.40 per barrel, while the global Brent benchmark was $50.26 per barrel in recent trading. 

One of the potential unintended consequences of a U.S. exit from the Paris accord could be a change in OPEC's recent strategy of production cuts to drive crude prices higher. But with U.S. output growth already cutting into the price gains from OPEC's cuts, the cartel's major players, such as Saudi Arabia and Iran, could decide it's now necessary to return to the market-share battle that sent oil prices below $30 as recently as early 2016. 

Whether or not that happens -- and frankly, it's an extreme example of the worst-case scenario for U.S. shale producers -- a glut of global oil inventories is already weighing on oil prices. And that's bad for American independents like EOG, Continental, and Pioneer Resources.

U.S. Silica and National Oilwell Varco are set to benefit

Even as oil producers could struggle with lower crude prices, increased production investment is already paying off for U.S. Silica and National Oilwell Varco.

National Oilwell Varco's onshore equipment, wellbore technologies, and completion equipment segments have shown signs of life recently, with all three reporting sequential improvements in sales in recent quarters. And while the company still reported a GAAP loss last quarter, its EBITDA and operating cash flows results have improved sequentially as well. 

U.S. Silica has also turned the corner. The company's frack sand sales have rebounded on the growth in shale drilling activity. This helped the company return to profitability last quarter, while investments in expanding its reach and scale have it positioned to ride the growth in shale production even higher in coming years.  

Even as the oil producers themselves could struggle with weak crude prices, both National Oilwell Varco and U.S. Silica are set to win from the growth in production spending in the near term. 

A solar panel maker will be a long-term winner, no matter what Trump decides

First Solar and many of its solar panel-making cohorts have seen sales fall recently as the industry enters a cyclical slowdown. However, First Solar is incredibly well positioned for the long term, no matter what direction Trump chooses to take on its climate and energy policy. 

First Solar already counts on sales outside the United States for a significant portion of revenue and cash flows. Furthermore, the company has more than $2 billion in net cash and short-term investments on its balance sheet, which has afforded it the ability to invest in improved manufacturing and its next-generation thin-film panels through the downturn, while its competitors will be forced to cut spending. 

This has the company on track to continue to lead the market and generate significant sales when panel demand recovers in the very near future, no matter what the Trump administration's policy on climate and energy. A global focus on climate action and the increased use of renewables is set to provide a powerful long-term tailwind for First Solar for many years to come.

Jason Hall owns shares of First Solar and National Oilwell Varco. Jason Hall has the following options: long January 2018 $45 calls on First Solar. The Motley Fool owns shares of and recommends National Oilwell Varco. The Motley Fool owns shares of EOG Resources and ExxonMobil. The Motley Fool has a disclosure policy.