Office Depot and Staples called off their plans to merge, triggering a trading halt for the companies' stocks Tuesday.

The retailers made the announcement after a federal judge granted a preliminary injunction Tuesday that had been requested by the Federal Trade Commission, which opposed Staples (SPLS)' plan to acquire Office Depot (ODP) for $6.3 billion.

Now the companies "plan to terminate their merger agreement," Staples said in a statement.

The FTC argued in December last year that combining the two companies would give them too large a chunk of the office supply retail market -- which would violate antitrust law.

"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 CEO Ron Sargent said in a statement.

The NASDAQ halted trading of both companies' stock around 6:30 pm ET on Tuesday.

It's the second time the FTC has blocked a merger of the two office suppliers, having halted their merger previously in 1997.

Staples and Office Depot have faced intense competition from retail stores that are not traditional office suppliers like Amazon (AMZN) and Wal-Mart (WMT). The industry is also reeling from a decline in printing activities among young consumers, many of whom don't even own printers.

Profits at both Staples and Office Depot have shrunk in recent years. Last year, Staples announced plans to shut 225 stores in North America.

But the FTC wasn't focused on competition over dwindling shoppers for office supplies. Instead, the agency pointed to the market for large business customers, where Staples and Office Depot are often the top two bidders.

"By eliminating competition between Staples and Office Depot, the transaction would lead to higher prices and reduced quality," the FTC said in a statement last December.

The companies had hoped the merger would help create over $1 billion in annual savings.

--CNNMoney's Matt Egan contributed to this report