A shale gas rig in the Marcellus shale play. Source: Flickr/Nicholas A. Tonelli

Unlocking value is the key to profits in the oil and gas business. And a surge in mergers and acquisitions activity in this industry is finally justifying its true valuations.

According to the U.S. division of audit and consulting firm PricewaterhouseCoopers, the second quarter of 2014 witnessed an unprecedented level of deal activity. Total second quarter deal volume increased a whopping 131% to $42.2 billion, from $18.3 billion in the first quarter. And this has been the strongest second quarter of oil and gas deals activity in the last five years, according to PwC's energy sector deals leader Doug Meier.

Why this development matters
For oil and gas investors, this is good news. Valuations that had remained suppressed are being realized for their true worth. In fact, it's a trend reversal from last year's dismal energy M&A market.

In 2013, total energy deals had dropped to five-year lows, and three reasons stand out:

First, there was a huge inventory of assets that oil and gas companies had accumulated, but required development. Companies soon realized that simply holding onto potential drilling locations without development does not necessarily boost valuations. According to an IHS estimate, between 2010 and 2012, oil and gas companies spent a staggering $600 billion  acquiring reserves. In fact, for companies like Chesapeake Energy (NYSE:CHK) and SandRidge Energy (NYSE: SD), this accumulation of reserves simply bloated up their balance sheets. Heavily burdended with debt, this eventually had a detrimental effect on their share prices. In effect, 2013 was a cool-off period when companies held onto their existing acreage and instead chose to focus on optimizing production volumes.

Source: Wikimedia Commons

Second, toward the end of last year, there was significant uncertainty over global crude oil prices. Buyers' and sellers' expectations of oil prices remained mismatched, which led to a freeze in deal activity. Additionally, pessimistic macro-economic data from U.S. housing and manufacturing sectors, along with slow economic growth in China fueled fears of an over-supply in crude oil markets.

Third, U.S. natural gas markets were still in the doldrums. As a result, pure-play natural gas companies intentionally moved away from natural gas production and transitioned to liquids production. Obviously, natural gas wasn't among the more attractive options available for deal makers.

What has changed this year?
Exploration and production companies have realized that -- in order to remain profitable -- they have to become leaner and more streamlined in their operations. According to Meier, they have continued to "realign their portfolios and divest non-core assets." Naturally, this creates more opportunity for deal making. But my hunch is that, a lot more deals are lined up in the coming months. Here's why:

Oil and gas deals in Q2 2014. Source: PricewaterhouseCoopers

Despite holding world-class acreage, quite a few companies are struggling to remain cash flow positive. While the United States is billed to become the world's largest oil producer in a few years, most of the production is occurring through unconventional drilling techniques.

For those uninitiated, unconventional drilling techniques are employed to tap crude oil from a layer of shale rock using horizontal drilling and hydraulic fracturing. Typically this is a much more expensive procedure than drilling a conventional well. Additionally, horizontally drilled wells have steep production decline rates.  As a result, scores of wells have to be drilled in order to maintain and increase production volumes. All in all, expenses are huge and some of these producers are burdened with debt. Accelerating their drilling programs looks like a tall order or nearly impossible.

It's no surprise why a promising company like Kodiak Oil & Gas (UNKNOWN:KOG.DL), which operates in the prolific Bakken shale play, let itself be acquired by Whiting Petroleum (NYSE: WLL). This consolidated group will now have greater access to capital, and are better equipped to accelerate drilling. But more importantly, the consolidated unit can afford to employ more efficient methods like well down-spacing, multi-stacked wells which, ultimately, will help the company turn cash flow positive. In other words, economies of scale will play a major role in cutting costs and increasing productivity. From what it looks, there are plenty more players in the upstream space that could follow Kodiak's route.

Another crucial factor that's aiding accelerated drilling programs, and eventually deal making, is high crude oil prices globally. Geopolitical tensions and higher economic growth from the emerging markets have provided a floor for high oil prices, and from what it looks, this doesn't seem to ease any time soon.

High oil prices influence other segments too
It's not just the exploration, or upstream, segment that's hot. High oil prices have influenced deal making in the midstream and refining segment as well. The midstream segment, which is in the business of transportation and storage of petroleum and petroleum products through pipelines and storage tanks, accounted for ten deals for a total transaction value of $12.1 billion. 

With crude oil and natural gas production volumes increasing to unprecedented levels across the United States, gathering systems and pipelines to refineries have become lucrative businesses. As a result, companies are spinning off their midstream services into separate, fee-based entities called Master Limited Partnerships, or MLPs. The parent company, or general partner, acquires assets and drops them down into these MLPs. Additionally, MLPs are ideal vehicles to raise capital in the debt markets. It's no surprise that MLPs accounted for 35% of the total oil and gas deal activity in the second quarter.

The refining and marketing segment, or collectively the downstream segment, witnessed another seven deals for $7.5 billion. All in all, the midstream and downstream segments accounted for $19.6 billion in M&A activity. 

Foolish takeaway
Oil producers are seeing greater efficiencies in drilling procedures, which is simultaneously helping them cut down on costs as well as increase production. Advanced techniques, such as pad-drilling and multi-stacked wells, are enabling down-spacing of wells. With more wells drilled per unit area, companies can increase production levels economically. Also, better economic growth in emerging markets, coupled with geopolitical tensions in Ukraine and the Middle East, has ensured that Brent crude oil prices have a floor. All these suggest to greater deal activity in the second half of 2014, and that should benefit investors.