ST. LOUIS • The Cardinals and All-Star leadoff hitter Matt Carpenter have agreed upon an extension that will likely allow him to finish his career with the team, as first reported by The Post-Dispatch.

The two-year extension will take Carpenter through the 2021 season, and it includes a possible third year as a vesting option. The team announced the extension during an afternoon press conference Wednesday at Busch Stadium.

"To be able to wear this uniform -- one I treasure -- for an entire career is special," Carpenter said. "I'm just extremely honored to be here. This team, with what we've got and the future that this team (has), the potential is there. I'm so excited to be a part of this."

Carpenter, 33, had a contract that was set to expire at the end of this season, though the team had an $18.5-million option for 2020. The new deal comes with $39 million in guaranteed money, with Carpenter getting $18.5 million in 2020 and 2021. An $18.5 million option for 2022 vests if he has 1,100 plate appearances combined in 2020-21 AND at least 550 in 2021. A no-trade clause takes effect in 2020. If the team doesn't exercise the 2022 option Carpenter receives a $2 million buyout.