What happened

Transocean (RIG 0.67%) stock had a pretty strong week as it rose 10.2% at its highest point in trading during the week, according to data provided by S&P Global Market Intelligence. Despite shares of the offshore drilling rig operator taking a breather Friday alongside the broader market, they were still on track to end the week up almost 5% as of 2:30 p.m. ET Friday. Thank a contract extension from a key customer.

So what

Transocean won an extension worth $181 million from Equinor SA for its harsh-environment semisubmersible Transocean Spitsbergen floater. The extended contract covers nine wells and two one-well options, with drilling expected to begin in October 2023 and end in April 2025.

Transocean specializes in ultra-deep water and harsh-weather drilling. Equinor SA is Transocean's second-largest customer behind Shell, and accounted for 30% of its revenue in 2021.

Now what

Transocean's revenue dropped 10% year over the year in the first quarter, and it incurred a larger adjusted net loss than expected. Yet, management expressed confidence in the company's prospects amid the high oil- and gas-price environment. Transocean's contract backlog value of $6.1 billion as of April was also among the highest in the industry.

Drilling companies have faced a long lean period that lasted several years as oil and gas companies slashed spending on deepwater exploration given the tough market conditions.

Demand for rigs, though, is picking up as oil and gas companies are increasing production to take advantage of sky-high prices. The war between Russia and Ukraine has disrupted supply in the oil and gas industry and sent prices of fossil fuels soaring. Transocean's latest order is testament to a revival in the offshore drilling market, something the company -- and investors -- have waited for, for several years now. With oil and gas prices seemingly unstoppable now, investors perhaps see even better days ahead for Transocean, and therefore wasted no time buying the stock this week.