MasTec (NYSE:MTZ) has seen its fortunes rise and fall with the health of the energy industry over the past several years. When conditions got tough for oil and gas exploration and production companies, they held off on construction projects, hurting MasTec's business. Lately, though, recovering energy prices have led to better times for the construction company.

Coming into Thursday's first-quarter financial report, MasTec investors hoped that the rebound for the company's key business segments would continue. MasTec's results brought not only better performance from energy but also a recovery in power generation and industrial projects that bode well for the remainder of the year and beyond.

Dug-out trench going up a hill with pipeline pieces in place to be connected.

Image source: MasTec.

MasTec builds energy

MasTec's first-quarter results built up more momentum from last quarter's numbers. Revenue of $1.52 billion climbed 9% from year-ago levels, outpacing the 2% growth rate that most of those following the stock were expecting. Adjusted net income jumped by more than half to $43.6 million, and the resulting earnings of $0.58 per share on an adjusted basis dramatically topped the $0.43-per-share consensus forecast among investors.

Unquestionably, the big winner for MasTec was the oil and gas segment. Revenue was higher by 16% as the division outpaced communications to be MasTec's biggest sales generator. But more importantly, the segment was also by far the most profitable, with adjusted pre-tax operating earnings more than tripling from year-earlier levels.

From a sales perspective, the power generation and industrial division also performed well. Segment revenue soared more than 60%, but unlike with oil and gas, that didn't lead to higher profits.

Elsewhere, results were weaker. Communications revenue was down more than 2%, and adjusted pre-tax operating profit fell 45%. The electrical transmission business saw even bigger sales declines of 17%, with a similar-sized profit hit to go with it.

Nevertheless, MasTec's backlog levels hit new records. The company reported $8 billion of business in its pipeline, up $310 million in just the past three months and pointing to active business levels going forward.

CEO Jose Mas celebrated the news. "We are proud to report strong first quarter financial results above expectations," Mas said, "as well as a new record backlog which achieved an $8 billion level for the first time in company history." The CEO noted the positive demand MasTec across multiple industries.

What's ahead for MasTec?

MasTec has high hopes for the remainder of the year. In Mas' words, "We are pleased that our strong confidence and visibility into continued growth prospects allow us to increase our 2019 annual guidance expectations to new record levels, and we look forward to continued improvement in 2020 and beyond."

The guidance that MasTec gave was also encouraging. For the second quarter, the construction specialist expects $1.8 billion in revenue, with adjusted earnings of $1.11 per share. Both of those figures are better than many were expecting. Meanwhile, MasTec kept its sales guidance for 2019 unchanged at $7.6 billion but boosted its earnings projections by $0.21 per share to a new prediction of $4.55 per share.

MasTec shareholders were reasonably pleased with the upbeat outlook, and the stock climbed 2% at the open on Friday morning following the late-Thursday announcement. The construction company has room to make more of its stronger sales performance and enhance its profitability. But after such a tough time in dealing with the slowdown in oil and gas over the past several years, signs of a recovery are encouraging and should lead to further momentum for MasTec over the course of 2019.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.