For a year and a half, Halliburton and Baker Hughes, two big oil field services companies, had been focused on their $35 billion merger. That distraction, even as commodity prices deteriorated and their peers cut costs to survive, is finally over.

The two companies announced in a statement on Sunday that they had decided to terminate their merger. The news came after an excruciatingly long regulatory review process that culminated in a lawsuit last month by the Justice Department to block the deal on antitrust grounds.

“While both companies expected the proposed merger to result in compelling benefits to shareholders, customers and other stakeholders, challenges in obtaining remaining regulatory approvals and general industry conditions that severely damaged deal economics led to the conclusion that termination is the best course of action,” said Dave Lesar, chairman and chief executive of Halliburton, in Sunday’s statement.

The deal was one that raised eyebrows from the start on whether it would get past regulators. The two companies were seeking to band together to compete with the likes of Schlumberger, and, in the meantime, to erase billions in costs related to operations and research and development. Things changed drastically soon after the deal was signed in November 2014. Oil prices sank to their lowest levels in years, a burden that has affected the entire industry.