After some initial confusion Wednesday morning over a premature announcement, Office Depot (ODP) said it will buy rival office-supply store OfficeMax (OMX) in an all-stock deal valued at about $1.2 billion.

Office Depot said it will issue 2.69 new shares for each OfficeMax share outstanding, valuing the rival at $13.50 a share. That reflects a 3.8% premium over Tuesday’s close.

Office Depot was originally scheduled to report fourth-quarter financial results next week, but a press release briefly appeared on the company’s website early Wednesday morning. The release also provided details related to the merger in a section titled, “Other Matters.”

Shortly after, sources told the New York Times that the press release was issued prematurely and that the terms of the deal had not been finalized as of publication.

The retailer then sent out two separate press releases: one announcing the deal, and the other announcing fourth-quarter and full-year earnings. OfficeMax also released its earnings on Wednesday, despite being scheduled to report financial results on Thursday.

In a conference call late Wednesday morning, Neil Austrian, Office Depot’s chairman and CEO, said the company’s webcast provider inadvertently released the announcement.

A spokesperson for the Securities and Exchange Commission declined to comment on whether the commission plans on investigating the erroneous releases this morning. When the official merger announcement went out, Office Depot filed an 8-K material event form related to the merger and a 10-K annual report with the SEC, according to the commission’s online database.

The official announcement said the all-stock deal, which the companies referred to as a “merger of equals,” is expected to close by the end of calendar year 2013. The combined company will achieve annual cost synergies of $400 million to $600 million, according to the two retailers.

Office Depot will take a 54% stake in the combined company, and OfficeMax shareholders will receive 46% ownership. However, Office Depot shareholder BC Partners, which has a 22% stake in the company, could take a stake of up to 5%. That would leave OfficeMax with 44% ownership and Office Depot with 51%.

Shares of Office Depot down 12.4% to $4.40 a share in early afternoon trading. OfficeMax was down 2.12% to $12.73 a share.

“Office Depot and OfficeMax share a similar vision and culture, and will greatly benefit from drawing on the industry's most talented people, combining our best practices and realizing significant savings,” Neil Austrian, chairman and CEO of Office Depot, said in a statement. “We are confident that this merger of equals represents a new beginning for our two companies and will allow us to build a more competitive enterprise for the long term.”

The combination of the two brands, should it take place, will create a company that could potentially rival Staples (SPLS), the biggest office-supply store.

The deal between Office Depot and OfficeMax will be subject to shareholder and regulatory approval, although Austrian said during a conference call Wednesday that it is “very unlikely” regulators will strike down the merger.

In 1996, Staples and Office Depot planned a tie-up, but it was struck down by anti-trust regulators amid worries it would lead to higher prices for office supplies. However, analysts say the landscape has changed dramatically in the past nearly two decades, with online competitors swooping in.

Staples also stands to benefit from the would-be merger of its two brick-and-mortar rivals and the subsequent closure of Office Depot or OfficeMax locations. On Tuesday, Janney Montgomery Scott raised its price target for Staples to $17 from $13. The stock was down 15 cents to $14.50 a share Wednesday.

Office Depot reported a fourth-quarter loss of $7.32 million, or six cents a share, on lower revenue, missing Wall Street estimates. Adjusted per-share earnings broke even for the period.

The company had a year-earlier profit of $20.4 million, or four cents a share.

Revenue fell 12%, or 11% in constant currency, to $2.62 billion. Gross margin narrowed to 29.9% from 30.3%.

Analysts expected per-share earnings of four cents and revenue of $2.76 billion.

OfficeMax reported a fourth-quarter loss of $33.4 million, or 39 cents a share, after posting a year-earlier profit of $3.4 million, or 3 cents a share. Asset impairment charges narrowed to $1.6 million from $11.2 million. The fourth quarter also included $76.7 million in charges related to pension expenses and other items.

Adjusted per-share earnings were down a penny to 16 cents.

Revenue dropped 7.4%, or 2.7% excluding currency impacts, to $1.7 billion.

Wall Street was looking for OfficeMax to report earnings of 15 cents a share and revenue of $1.75 billion.

Follow Matthew Rocco on Twitter @MatthewRocco

Follow Adam Samson on Twitter @adamsamson.