UPDATE, 7/24/12, 1 p.m. EDT: Munger, Tolles & Olson’s role on the deal has been added to the ninth paragraph below.

A decade after going public, Peet’s Coffee & Tea has agreed to be taken private by German conglomerate Joh. A. Benckiser for $974 million.

The deal sees JAB pay $73.50 per share in cash for the Emeryville, California–based specialty coffee maker, a 29 percent premium over Peet’s Friday closing price.

Peet’s board of directors already signed off on the deal, according to a press release the company issued Monday, and final approvals are expected in three months. The current leadership team and employees will stay on at Peet’s.

The coffee company’s longtime counsel at Cooley advised it on the deal. San Francisco–based Cooley partner Kenneth Guernsey, who led the deal team along with M&A partner Barbara Borden in San Diego, has done work for Peet’s since 1996 and took it public in 2001.

Skadden, Arps, Slate, Meagher & Flom provided legal counsel to JAB with a deal team led by M&A partners Sean Doyle and Paul Schnell in New York. Skadden tax partners David Rievman and Paul Oosterhuis and intellectual property partner Bruce Goldner also advised. None of the lead attorneys on the deal responded to requests for comment Monday.

Since its founding in 1966, Peet’s has been a mainstay in the San Francisco Bay Area. Though never spreading as far as Starbucks Coffee Company—which actually owned Peet’s for a period in the 1980s—the company has opened stores over the decades throughout California and in Oregon, Washington, Colorado, Illinois, and Massachusetts. It also sells its coffees and teas in grocery stores. (San Francisco Bay Area coffee brands have been popular this summer; in June, Starbucks bought the parent company of La Boulange, which has 19 cafes around San Francisco, for $100 million.)

A few years ago, Peet’s tried to expand into the single-serving coffee market with what became a failed purchase of Irvine, California–based Diedrich Coffee. Soon after a November 2009 announcement that Peet’s would buy Diedrich for $213 million in cash and stock, a fierce bidding war ensued with Green Mountain Coffee, which ultimately emerged as the winner the next month with a $290 million offer.

For its part, JAB already has one coffee brand in its holdings through a minority interest in D E Master Blenders—one of several brands spun off from Sara Lee in July—according to Reuters. JAB is also the company that owns Coty, the cosmetics company that unsuccessfully attempted to take over Avon Products in an unsolicited $10 billion bid in April. (Skadden’s Schnell advised the JAB affiliate in that deal.)

In addition to JAB, BDT Capital Partners is playing a role as a minority investor and adviser on the Peet’s buy. Munger, Tolles & Olson corporate partners Mary Ann Todd and Brett Rodda, as well as tax partner David Goldman, advised the Chicago-based bank on the deal.

Rounding out the Cooley deal team working for Peet’s were business special counsel Rama Padmanabhan; business partner Mischi a Marca; litigation partners Gordon Atkinson and Christopher Durbin; insurance litigation partner Ann Mooney; compensation and benefits partner Thomas Reicher; real estate special counsel Anna Pope; business partner Robin Lee; business of counsel Diane Savage; antitrust partner Howard Morse; tax partner Susan Philpot; and clean energy and technologies special counsel Renu Gupta. Davis Polk & Wardwell partner John Amorosi advised Citigroup, which served as financial adviser to Peet’s.

Skadden’s work on the coffee deal is one of six major M&A deals announced since Sunday that yielded assignments for the firm. It also represented DigitalGlobe in its $900 million merger with GeoEye; GenOn Energy in its $1.7 billion merger with NRG Energy; VMware in its $1.05 billion acquisition of Nicira; and Stanley Black & Decker in its $850 million buy of Infastech.

Skadden also appeared on the seller side of a rail consolidation deal announced Monday, advising RailAmerica Inc. in its sale to Genesee & Wyoming Inc. for $1.4 billion in cash. The companies are two of the largest competitors in the short line and regional rail business in North America. If approved, the combined entity would operate 108 railroads in 37 states.

Skadden M&A partners Joseph Coco and Thomas Greenberg worked on the deal along with executive compensation and benefits partner Regina Olshan and tax partner David Polster. Sidley Austin senior counsel Terence M. Hynes and counsel Matthew Warren provided regulatory advice to Jacksonville, Florida–based RailAmerica.

On the Genesee side, Simpson Thacher & Bartlett partner William Curbow in New York led a team advising the Greenwich, Connecticut–based company that also included Simpson partners William Sheehan and AJ Kess. Steptoe & Johnson partners David Coburn and Anthony LaRocca advised Genesee on regulatory aspects of the deal, and Pittsburg-based Thorp Reed & Armstrong also provided legal counsel.

The $27.50 per share offered by Genesee is an 11 percent premium over RailAmerica’s closing price Friday. In a release, Genesee says the combination should “provide strong leverage to the eventual recovery of the U.S. economy.” Genesee said it expects to fund the transaction, as well as refinance existing debt, with $2.3 billion in new debt and roughly $800 million of equity or equity-linked securities. The deal, which is expected to close in the third quarter, is subject to approval by the U.S. Surface Transportation Board.