What happened

Shares of Apache (APA 0.43%) plunged 17.8% in May, according to data provided by S&P Global Market Intelligence. Dual headwinds weighed on the oil and gas company's stock price last month: plunging crude prices and Apache's lackluster first-quarter results.

So what

May was a rough month for the oil market, as crude prices tumbled by double digits. The U.S. oil benchmark, WTI, experienced the biggest decline at 16%, which pushed it down to $53.50 per barrel, its lowest level since mid-February. While a range of factors weighed on crude prices last month, the main culprit was escalating trade tensions between the U.S. and China. The oil market is growing increasingly concerned that this trade war will negatively impact the global economy, which would sap demand for oil.

An oil pump at dusk.

Image source: Getty Images.

This slump in oil prices will impact producers like Apache since it will earn less money per barrel if oil remains weak. In Apache's case, it needs crude to average $53 per barrel this year so that it can generate enough cash to fund its operating plan. If oil falls below that key level, the company either needs to cut spending or borrow money to bridge the gap.

In addition to the pressure from lower oil prices, Apache reported disappointing first-quarter results last month. The oil and gas company's adjusted earnings came in at $0.10 per share, which missed analysts' expectations by $0.04 per share. The main issue was weaker gas prices in the Permian Basin because of that region's lack of adequate pipeline capacity. That led Apache to defer some of its production late in the quarter, though overall output was strong, as its production in the U.S exceeded its guidance, fueled by record output in the Permian Basin.

Now what

While Apache can't do anything about the price of oil, it is working on solutions to address the Permian Basin's infrastructure issues. The company's midstream arm, Altus Midstream (KNTK), is investing in five long-haul pipelines that should start up over the next two years, including two large-scale natural gas pipelines. In addition to that, Altus Midstream completed work on a natural gas processing plant last month. These investments should enable Apache to make more money on its production in the coming years, which should improve its profitability.