Dow Chemical ( DOW) and Rohm & Haas ( ROH) have reached an agreement to merge by April 1, according to a joint statement released late Monday.

Shares of Dow Chemical were falling nearly 6% at $5.97 in after-hours trading, while Rohm & Haas was gaining 4.5% at $77.44 a share.

The agreement came after a day of intense negotiation and two consecutive delays in the trial in which Rohm & Haas was suing Dow Chemical for breach of contract of their original merger agreement.

"Today's agreement resolves the litigation initiated by Rohm & Haas against Dow on January 26, 2009, with a resolution that is beneficial for each party," the joint statement said.

Aside from a key change in its financial structure, the merger between Dow and Rohm will go through according to the original deal points established last June.

Dow Chemical will pay most common shareholders of Rohm & Haas the prearranged price of $78 a share.

However, Rohm & Haas' two largest shareholders, the Haas Family Trust and Paulson & Co., a hedge fund, will contribute $2.5 billion in equity to Dow Chemical in exchange for preferred stock in Dow. They will also give Dow the option to accept an additional $500 million equity injection.

The additional equity will serve to reduce the amount of debt that Dow Chemical must incur in order to close the merger. The required debt load had ballooned to $13 billion at one point, although Dow Chemical succeeded in renegotiating the terms of the loan late last week.

If you liked this article you might like

Why Bayer's $66 Billion Takeover of Monsanto Probably Won't Happen Until 2018

Cramer: The Market Is Back to the Late '80s, Early '90s

DowDupont Closes Higher in First Day of Trading, Company Still Faces Challenges

FMC Stock's Impressive Rally Has Another 20% to Gain: Jim Cramer

Jim Cramer on Why FMC Was Upgraded by Bank of America