Image source: Staples.

What: Shares of office-supply retailers Staples (SPLS) and Office Depot (ODP 0.83%) rose during March, driven by growing optimism that the merger between the two companies will ultimately be approved. Shares of Staples jumped 16.7% during March, while shares of Office Depot soared 39.8% higher, according to data provided by S&P Global Market Intelligence.

SPLS Chart

SPLS data by YCharts

So what: Late last year, the FTC sued to block the merger between Staples and Office Depot, arguing that allowing the deal to go through would reduce competition and lead to higher prices for large business customers. Both Staples and Office Depot sell supplies directly to large organizations, a distinct and less competitive business compared to retail.

The odds that the merger will be approved looked long until March 23, when a report surfaced indicating that the judge in the FTC's lawsuit rebuked the FTC's tactics, accusing the agency of pressuring e-commerce giant Amazon.com (AMZN -2.32%) to provide favorable testimony. Amazon competes directly with both Staples and Office Depot in the retail business, and Staples' argument hinged on Amazon as a major threat in the business-to-business market as well.

On March 29, the New York Post reported that sources had told it Staples was on the brink of winning its case against the FTC, with a decision expected soon.

Now what: The merger between Staples and Office Depot has been a roller-coaster ride, but it now looks a lot more likely that the deal will go through compared with a few months ago. Shares of both Staples and Office Depot are still below highs reached following the original announcement of the merger in early 2015, and both stocks could see further upside if the FTC is defeated.

If the deal is approved, a combined Staples-Office Depot will be better able to withstand a push from Amazon in the business-to-business market. At the moment, Amazon's presence in the business-to-business market is relatively small, but that probably won't be the case for long.