LOS ANGELES (AP) — Catcher Austin Barnes agreed Sunday to a $7 million, two-year contract with the Los Angeles Dodgers covering 2023 and '24 rather than become a free agent after this year's World Series.

Barnes gets $3.5 million in each of the next two seasons, and the Dodgers have a $3.5 million team option for 2025. He can earn up to $500,000 annually in performance bonuses for games: $50,000 each for 65 and 70, $75,000 for 75, $150,000 for 80 and $175,000 for 85.

A member of the Dodgers' 2020 World Series champions, Barnes is hitting .179 with four homers and 12 RBIs in 31 games this season. He has thrown out five of 14 runners attempting to steal, playing 26 games at catcher.

Barnes has a $2.6 million salary this in 2022, the second season of a two-year contract that originally guaranteed $4.3 million.

Barnes, 32, was acquired from Miami before the 2015 season and is the third-longest tenured player currently on the Dodgers behind Clayton Kershaw and Justin Turner.