International Paper Co. said it agreed to acquire Temple-Inland Inc. for $3.7 billion, ending a three-month battle for control of the shipping-box manufacturer. International Paper increased its offer to $32 a share, the company said in a statement. Temple-Inland had previously rejected a June 6 all-cash bid of $30.60 a share as too low.

“The strategic benefits of this combination are clear and we are pleased to be able to move forward on terms that are financially attractive for both sets of shareholders,” International Paper Chief Executive Officer John Faraci said in the statement.

Faraci said in June the deal would raise International Paper’s share of the North American corrugated-packaging market to about 37 percent from 27 percent. To fend off the original bid, Temple-Inland had adopted a so-called poison pill takeover defense that limited any person or group from acquiring more than 10 percent of its stock. The company also has a staggered board, meaning it could have taken more than a year for International Paper to gain control through proxy fights.