UPDATE, 11/28/12, 11:08 a.m. EST: The names of additional Hogan Lovells attorneys advising on the transaction have been added in the ninth paragraph.

Months after Lehman Brothers Holdings, Inc. secured the last remaining stake in apartment operator Archstone Enterprise it did not already own, the now-defunct investment bank has agreed to sell the company to a pair of real estate investment trusts for a total of $6.5 billion in cash and stock.

Arlington, Virginia–based AvalonBay Communities, Inc. will take a 40 percent share of Archstone, while Chicago investor Sam Zell’s Equity Residential will acquire the remaining 60 percent stake. AvalonBay and Equity Residential will also assume roughly $9.5 billion of debt between them as part of the deal, which also includes a $650 million breakup fee, payable to Lehman, should the buyers’ actions cause it to collapse within 60 days of signing. The sale is expected to close in the first quarter of 2013.

The deal, which was announced Monday, comes some six months after Lehman paid $1.58 billion to acquire the 26.5 percent stake in Englewood, Colorado–based Archstone that it did not already hold from Bank of America and Barclays Bank. That transaction came amid Lehman’s efforts to block Zell in his attempt to take over Archstone by buying up stakes in the apartment owner piecemeal. Lehman had previously trumped an Equity Residential bid for a separate 26.5 percent Archstone stake owned by BofA and Barclays in January on its way to exercising its right of first offer to purchase the final stake in May. Those moves left Equity Residential without an ownership interest in Archstone—though Zell walked away with $150 million breakup fees in the process.

Lehman acquired Archstone in an expensive 2007 takeover that played a part in the bank’s collapse during the economic crisis. The company operates more than 75,000 units throughout the U.S. and Europe. Lehman’s Chapter 11 filing in 2008 resulted in an asset fire sale that saw BofA and Barclays split a 53 percent stake in Archstone.

When Lehman bought back control of Archstone earlier this year, it was expected to take the company private and use the proceeds to pay back creditors that Reuters says are still owed more than $30 billion. Reuters also reported last week that Lehman was planning to raise $3.45 billion in an Archstone initial public offering that would have been the country’s largest-ever commercial real estate IPO.

Goodwin Procter—which, according to a firm spokesman, was poised to advise Archstone and Lehman on that IPO—landed the lead role advising AvalonBay on its piece of the deal announced Monday. Goodwin has advised AvalonBay on past REIT matters, including its 2008 acquisition of $135 million in California state funding that went toward a San Francisco housing development joint venture.

Boston-based M&A partner John Haggerty is leading a Goodwin team on the Archstone deal that also includes real estate partners Craig Todaro and Christopher Barker, as well as capital markets chair Ettore Santucci, finance partner Jennifer Bralower, and tax partner H. Neal Sandford. AvalonBay general counsel Edward Schulman is a former Goodwin corporate partner.

Hogan Lovells and Morrison & Foerster, meanwhile, are representing Equity Residential on the deal. Both firms worked on Zell’s past attempts to acquire control of Archstone. Washington, D.C.–based Hogan Lovells corporate partner Bruce Gilchrist is leading the team from that firm.