NEW YORK (AP) — Office Depot Inc. said Wednesday it will buy Office Depot in an all-stock deal that would transform office-supply retail sector.

Boca Raton, Fla.-based Office Depot Inc. and Naperville, Ill.-based OfficeMax said holders of OfficeMax shares will receive 2.69 shares of Office Depot for every OfficeMax share they own.

That’s equal to about $13.50 per share, based on Office Depot’s $5.02 per share closing price Tuesday, giving the deal a total value of about $1.2 billion. OfficeMax had about 86.7 million shares outstanding as of Oct. 26, according to SEC filings. It is a 3.8 percent premium to OfficeMax’s closing price of $13 on Tuesday and a 26 percent premium to OfficeMax’s closing price on Friday, before word of negotiations leaked out.

The combined company’s name, marketing brands and corporate headquarters will be determined after the company names a CEO.

There was some confusion about the deal Wednesday morning when Office Depot reported terms of the deal in a release on its Web site early Wednesday and then removed it, before restoring it after the market opened.

But Morningstar analyst Liang Feng said he did not expect the premature release would damage to the companies.

“I don’t think it will cause that much of headache for the companies unless deal doesn’t go through,” he said.

The move would combine the No. 2 and No. 3 office supply retailer and lead to consolidation in an industry that analysts have said for years has too many stores. It reflects the changing retail landscape as “big box” stores become outmoded and more people shop online.

Office Depot and OfficeMax, along with bigger rival Staples Inc., were all founded in the mid- to late 1980s and helped pioneer the big-box boom in the 1990s, expanding rapidly in the U.S.

But the rise of Web retailers like Amazon.com and more expansion into office supply categories by discounters like Costco and Wal-Mart has been tough on the sector. In addition, office suppliers were slow to bounce back from the recession, as consumers and small businesses alike cut back on ordering office products.

The companies have closed stores, slashed costs and streamlined operations to offset stagnant sales. Rumors about possible consolidation have swirled around the sector for years but nothing ever materialized.

The Wall Street Journal reported the possibility of the deal on Monday, sending stock across the sector soaring on Tuesday.

OfficeMax said the move is expected to result in $400 million to $600 million in cost savings by the third year of the deal. Both companies will have equal representation on the combined entity’s board.

The deal is expected to be complete by the end of the calendar year.

Analysts say that if the deal closes it would likely benefit the largest office supply player Staples Inc. since the combined entity will likely close stores, leading to market share opportunities for Staples.

“We think a potential merger would result in a significant number of store closings, and thus an improvement in the overall economics of the office supply retail business,” said S&P analyst Ian Gordon on Tuesday. “This area has been under pressure from a weak business spending environment and competition from non-traditional channels like Amazon in our view.”

The office supply sector is worth about $21.2 billion, according to research firm IBISWorld Inc. in Santa Monica, Calif. Of that, Staples holds a 35 percent market share, Office Depot 26.1 and Office Max 15.6.

Staples is much larger than its smaller rivals, with 2,295 stores worldwide and a market capitalization of $9.56 billion. In contrast Office Depot’s market capitalization is $1.43 billion and OfficeMax is $1.13 billion. Market capitalization is the market value of a company’s outstanding shares and can be used to measure a company’s size.

The deal still has to go through shareholder and regulatory approvals, and office supply mergers have been questioned by regulators in the past. In 1997, Staples Inc. attempted to buy Office Depot but the deal was nixed by the Federal Trade Commission due to concerns the combined company would have too much of a competitive advantage in the marketplace.

Office Depot, which also reported quarterly results that missed expectations on Wednesday, saw shares fall 8 cents to $4.94 in morning trading. OfficeMax shares rose $1.18, or 9 percent, to $14.18.

Staples shares fell 29 cents, or 2 percent to $14.36.

(TM and © Copyright 2013 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)