After a months-long battle over the fate of one of baseball's iconic franchises, beleaguered owner Frank McCourt has finally agreed to sell the Los Angeles Dodgers. Major League Baseball announced the deal late last night, ending a bitter dispute that sent the team into bankruptcy and caused loyal fans to revolt.

According to the Los Angeles Times, the sale will supervised by the bankruptcy court and will include the team, Dodger Stadium, the surrounding parking lots, and all the other assets owned by McCourt. The league had seized control of the team's operations earlier this season, accusing McCourt of siphoning millions of dollars away from the Dodgers for his own personal use, including paying for his ongoing legal battle with ex-wife, Jamie.

The sale will likely set a record for the highest price ever paid for an MLB franchise. Forbes estimates the team to be worth about $800 million, but McCourt was offered $1.2 billion for them earlier this year and if a bidding war develops (there are several suitors that have expressed interest) the price could go even higher. Before MLB attempted to take over the team, McCourt had negotiated a local TV rights deal with Fox worth $3 billion over 20 years, proving that the Dodgers are still one of the hottest commodities in sports.

McCourt and his wife paid $421 million for the franchise in 2004, but is unlikely to realize much profit due to his massive  legal bills and tax debts. He and his wife recently agreed to a divorce settlement that requires him to pay her $130 million for her share of the team (among other things.)

None of that matters any more to Dodger fans, however, who are simply glad to be rid of their hated owner. Attendance plummeted this year as fans protested McCourt's decimation of the team by staying away in droves.