NEW YORK (AP) Just as a trial was to begin, Major League Baseball and its fans reached agreement Tuesday to expand the menu of online packages for televised games.

The deal came weeks after baseball's lawyers told a judge that for the first time the league was going to let fans buy single-team packages for fans who watch games online. In the past, viewers who didn't live in their favored teams' home markets had to buy access to every single televised MLB game.

Ned Diver, an attorney for fans who filed the class-action lawsuit in 2012, confirmed the preliminary settlement, though he did not immediately describe the terms.

More from FoxSports

In a statement, Major League Baseball confirmed the settlement but said it could not comment further because ''the process remains ongoing.'' A lawyer for the league did not immediately comment.

The trial had been scheduled to start Tuesday in Manhattan federal court, though officials indicated last week that it was unlikely to take place as both sides and the judge ceased filing papers associated with the case.

MLB's lawyers also said recently they were planning to make the same changes to their television packages as the National Hockey League made when it settled its side of the lawsuit last year. The NHL also agreed to let fans buy single-team packages.

The new packages have not yet been publicly announced by baseball and pricing information about them has not been released.

In 2013, U.S. District Judge Shira Scheindlin ruled that baseball could not use its antitrust exemption as a defense.

The lawsuits had claimed that the leagues' clubs and some television broadcast entities collude to eliminate competition in the airing of games on the Internet and on television. Baseball had defended a decades-old system of regional television contracts designed to protect each baseball team's area from competitors.

More recently, baseball has multiplied options for fans so that they can get games on various electronic devices.

''Make no mistake, this mission is not altruistic,'' baseball's lawyers said in court papers last month. ''Baseball faces fierce competition, including from other sports offerings and an increasing slate of non-sports entertainment and leisure options.''

Diver had argued in court papers that dividing the country into geographic territories for each team had strengthened baseball's monopoly and permitted it to overcharge fans.

---

AP Baseball Writer Ron Blum contributed to this report.