ST. LOUIS (AP) The St. Louis Cardinals will stay on Fox Sports Midwest through 2032, thanks to an agreement announced Thursday.

The 15-year deal begins in 2018 and runs through the 2032 season. Financial terms of the deal were not disclosed.

The Cardinals are a lynchpin of Fox Sports Midwest, which broadcasts games to parts of 10 states. Cardinals games are the highest-rated prime-time programming in St. Louis during the baseball season, and the local ratings ranked first among all Major League Baseball teams in 2014. This season, only the Kansas City Royals have higher local ratings.

More from FoxSports

''The St. Louis Cardinals and St. Louis Blues are really critical to our St. Louis operation,'' Fox Sports Midwest Senior Vice President and General Manager Jack Donovan said. ''They provide the backbone to our programming. The Cardinals have 150 games, which is an awful lot of premium content for the network.''

Local rights packages in baseball have skyrocketed in value as live-event programming has become increasingly popular among viewers and advertisers.

''Sports have emerged as some of the best content on television,'' Donovan said. ''They're not in reruns, it's unpredictable, fewer commercials. People like that.''

Plus, the Cardinals have been among baseball's most successful franchises for several years - on and off the field. In the two decades under the current ownership, the Cardinals have been to the postseason 12 times, won four National League pennants and two world championships.

The new rights package should help the team retain some of its stable of young talent that includes pitchers Carlos Martinez, Michael Wacha and Trevor Rosenthal, as well as second baseman Kolten Wong and outfielder Randal Grichuk.

Cardinals Chairman Bill DeWitt Jr. said in a statement that Fox Sports Midwest has ''done an excellent job with our telecasts, and this agreement will help us remain competitive in all areas of talent acquisition, from the amateur draft and international market to the Major League payroll.

''It also enables continued investment by the Cardinals in Busch Stadium, Ballpark Village, and other strategic initiatives,'' he said.

Patrick Rishe, director of the Sports Business program at Washington University in St. Louis, said live sporting events provide content for the male 25-45 demographic that advertisers cherish.

''Baseball is not America's pastime anymore, it's football,'' Rishe said. ''But it's still a very valuable sports property, especially in the summertime, when there's very little competition for the consumer's attention.''

Such deals are common in the MLB. The Arizona Diamondbacks and Fox Sports Arizona announced a new 20-year deal in February. And when Albert Pujols left St. Louis as a free agent, the Los Angeles Angels were able to outbid St. Louis in part because of a new TV rights package.