In an effort to better compete with online and big-box office supply retailers, Staples agreed to buy rival Office Depot in a $6.3 billion cash and stock deal. Staples said it started discussion with Office Depot in September, and the deal is expected to close by the end of 2015.

Amazon.com and Walmart have eaten into the sales of the office supply retailers.

Staples has market value of $11 billion, while Office Depot, its nearest rival, has a market value of $4 billion. Regulators denied Staples’ previous attempt to buy Office Depot in 1997 due to antitrust concerns. However, the FTC approved Office Depot’s $976 million acquisition of OfficeMax in 2013, citing increased competition in the office supply industry.

“This transaction delivers great value for our shareholders and creates a company ideally positioned to serve our customers and grow over the long term,” said Office Depot CEO Roland Smith. “It is also an endorsement of our many accomplishments and the tremendous success we’ve had integrating Office Depot and OfficeMax over the past year. We look forward to bringing our experience and knowledge to the new organization.”

“This is a transformational acquisition which enables Staples to provide more value to customers, and more effectively compete in a rapidly evolving competitive environment,” said Ron Sargent, Staples’ Chairman and CEO, in a statement. “We expect to recognize at least $1 billion of synergies as we aggressively reduce global expenses and optimize our retail footprint. These savings will dramatically accelerate our strategic reinvention which is focused on driving growth in our delivery businesses and in categories beyond office supplies.”

Sources: Wall Street Journal, RetailWire