Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

NEW YORK — 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 online TV packages. In the past, viewers who didn't live in their favored teams' home markets had to buy access to every single televised MLB game.

According to lawyers for fans who filed the class-action lawsuit in 2012, MLB will offer unbundled Internet packages for the next five years, including single-team packages for $84.99 next season. They said that's a 23 percent drop from the cheapest version previously available.

"We believe this settlement brings significant change to the sports broadcasting landscape," said one of the plaintiff lawyers, Ned Diver. "It is a big win for baseball fans."

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.

Audience Aging, Shrinking, But Baseball More Valuable Than Ever

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.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

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.

NFL to Live-Stream All London Games, in Talks With Apple, Google

"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.

The agreement provides other options to consumers who already subscribe to regional sports cable networks. The league will allow a cable subscriber to buy access to a visiting team's broadcast online. MLB also agreed that it will try to provide live local team broadcasts over the Internet for authenticated cable subscribers by the start of the 2017 season.

The deal makes no mention of fans who don't subscribe to cable and wish to view their local teams online.

AP Baseball Writer Ron Blum contributed to this report.