Express Scripts, Inc. (NASDAQ:ESRX) said it agreed to buy Medco Health Solutions, Inc. (NYSE:MHS) for $29.1 billion cash and stock deal that would see Express Scripts becoming the largest pharmacy-benefits manager in the U.S.

The news came after Medco said it lost an $11 billion contract with United Health (NYSE:UNH), which have accounted for 17 percent of its revenues in 2010. The merger assures United Health will bring the $11 billion of pharmacy benefits management business currently outsourced to Medco in-house to its OptumRx subsidiary.

The deal makes sense for Medco as it is under pressure over losing key contracts. In March, Medco lost the renewal of a $500 million contract with the California Public Employees Retirement System. In addition, it lost renewal contracts with Federal Employees Health Benefit Program, and a Universal American unit.

Express Scripts will pay $71.36 per Medco share, representing a premium of 28 percent over Medco's closing share price on July 20, 2011.

Shareholders of Medco will receive $28.80 in cash and 0.81 shares for each Medco share they own upon closing of the transaction. 

The cost and quality of healthcare is a great concern to all Americans; this is the right deal at the right time for the right reasons, said George Paz, chairman and CEO of Express Scripts.

The deal, which is expected to save Express Scripts $1 billion in costs, is estimated to be slightly accretive to earnings in the first full year after closing and moderately accretive once fully integrated.  

Meanwhile, the merger will combine the expertise of two complementary pharmacy benefit managers (PBMs) to accelerate efforts to lower the cost of prescription drugs and improve the quality of care for Americans.  

In addition, the deal comes as by 2014, spending for specialty medicines for diseases such as cancer, multiple sclerosis and hepatitis is estimated to comprise 40 percent of U.S. drug spend. 

Upon closing of the transaction, Express Scripts shareholders would own 59 percent of the combined company and Medco shareholders are expected to own approximately 41 percent.

The deal, which is subject to customary closing conditions, is expected to close in the first half of 2012.  The companies believe that they will be successful working through the regulatory review process.

The corporate headquarters will be in St. Louis and George Paz will serve as chairman and CEO of the combined organization. The Board of Express Scripts would be expanded to include two current independent Medco board members.

The combined company would compete with CVS Caremark (NYSE:CVS), Walgreen (NYSE:WAG) and Rite Aid (NYSE: RAD).

Credit Suisse and Citigroup were financial advisors for Express Scripts, while J.P. Morgan and Lazard advised Medco.

Shares of Express Scripts were up 5 percent in Thursday morning trade at $55.30 on Nasdaq, while Medco shares climbed 14 percent to $63.45 on NYSE.