Shares of retailers Office Depot and Staples plunged Wednesday following news that the companies plan to terminate their planned merger after a U.S. federal judge ordered the deal temporarily halted because of antitrust concerns.

Shares of Staples, the No. 1 office supply chain, were lately down 15 percent at $8.78, while those of smaller rival Office Depot were down 35 percent at $3.95 in early trading Wednesday.

Judge Emmet Sullivan of U.S. District Court for the District of Columbia, in a three-page order granting the Federal Trade Commission's request for a preliminary injunction, said the agency had shown there was a "reasonable probability" that the merger would "substantially impair competition" for the sale of office supplies to large business customers.

He said he would publish an opinion under seal Wednesday.

Staples, based in Framingham, Massachusetts, said in a statement it would terminate the $6.3 billion deal and pay Office Depot a $250 million breakup fee.

"We are extremely disappointed that the FTC's request for preliminary injunction was granted despite the fact that it failed to define the relevant market correctly, and fell woefully short of proving its case," Staples chief executive Ron Sargent said in a statement. "We believe that it is in the best interest of our shareholders, customers and associates to forgo appealing this decision."

The FTC called the judge's decision "great news."

"This deal would eliminate head-to-head competition between Staples and Office Depot, and likely lead to higher prices and lower-quality service for large businesses that buy office supplies," Debbie Feinstein, head of the FTC's Bureau of Competition, said in a statement.

The FTC, in a complaint filed in December, argued the deal was illegal because each company was the other's biggest rival. It said the two sold 79 percent of the pens, paper, file folders and other "consumable office supplies" sold to Fortune 100 companies.

The FTC had stopped a merger attempt between the two companies in 1997. But in the intervening 19 years, Amazon and other online sellers have exploded onto the scene, while megastores such as Costco and Wal-Mart Stores Inc. have further crowded the market.

Staples was emboldened to offer to buy Office Depot, based in Boca Raton, Florida, after the smaller chain succeeded in buying No. 3 OfficeMax in November 2013 with no divestitures.

The case is the Federal Trade Commission et al v Staples et al. It is No 15-2115 in the U.S. District Court for the District of Columbia.

Data from Reuters were used to report this story.