Staples' attempted acquisition of Office Depot is done for. The two companies announced today that they would put an end to their merger agreement, following a federal judge's decision to side with the Federal Trade Commission and issue a preliminary injunction prohibiting the purchase.

The FTC proved that "there is a reasonable probability that the proposed merger will substantially impair competition in the sale and distribution of consumable office supplies to large business-to-business customers," the judge wrote, according to The Wall Street Journal. The FTC filed suit in December, arguing that allowing the two companies to combine would likely lead to higher prices of office supplies, particularly for big businesses. Staples tried to negotiate, but the commission wasn't having it.

This is Staples' second failed Office Depot merger

Staples announced its plan to acquire Office Depot in February of 2015, for what was valued at the time to be $6.3 billion in cash and stock. Staples said the merger would save the company $1 billion annually through "cost synergies," supposedly leading to "more value to customers." It's hard to imagine a combined Staples–Office Depot being a better experience than either offers on its own, so this is probably good news for all but the two companies' shareholders. The Journal points out that Staples and Office Depot tried to merge back in 1997 and were also blocked back then.

Staples' CEO, Ron Sargent, is pretty unhappy with the outcome, saying that the FTC "fell woefully short of proving its case." Nonetheless, the company does not intend to appeal. Neither does Office Depot, which says it is "respectful" of the ruling but "disappointed" with the outcome. One outcome it won't be disappointed with: the $250 million breakup fee it gets from Staples because the deal fell through.

Update May 10th, 8PM ET: Staples and Office Depot both announced plans to terminate the merger. This story has been updated to reflect their decision.