Halliburton Co was able to swing to a profit during the third quarter as the second largest company specializing in oil services in the world increased business from oil producers that are ramping up operations following the worst crash in the crude market in more than a generation.

After calling that the oil cycle had bottomed out three months ago, the company posted its first sales increase in North America since the crude downturn started in the middle of 2014.

Halliburton’s sales in its biggest market were up 9% to end the quarter at $1.65 billion compared to the second three-month period of 2016.

The company, which is based in Houston, helps oil explorers to drill and finish wells posted a $6 million net income equal to 1 cent per share, which was better than a $54 million loss equal to 6 cents per share for the same quarter one year ago. Analysts were expecting a loss of 6 cents.

Dave Lesar the CEO at Halliburton said he was pleased with the results of the third quarter given the overall devastation the industry has been facing the past two years.

In the short term, the company will remain cautious regarding customer activity during the fourth quarter due to the holidays and the seasonal down times that are weather related.

Halliburton sales for the United States and Canada plunged over two-thirds during the oil downturn due to customers cutting back on spending in order to survive the global rout on oil due to a glut of production.

Halliburton executives and those at its largest competitor Schlumberger said near the end of July the worst might have ended after prices of oil bounced from their lows of February and the land rig counts in the U.S. hit bottom during May.

Most of the sector of oil services this year has lost money in North American operations, which is home to the largest market in the world for hydraulic fracturing across shale fields.

While the contractors across the globe have started to try to increase service pricing as more activity takes place, Jeff Miller the Halliburton president called negotiations with clients a “barroom brawl.”

Lesar gave credit to relentless management of costs for the surprise profit during the third quarter, as the business took advantage of an increase in drilling in shale fields in the U.S.