The St. Louis Cardinals have agreed to a five-year, $51 million contract extension with Carlos Martinez, according to a source.

The deal includes two team options that could run through 2023 and sets a new standard for a player in his first year of arbitration eligibility.

The previous record was established by Corey Kluber when he signed a five-year, $38.5 million deal in April 2015.

Martinez, 25, had a 3.04 ERA in 31 starts for the Cardinals last season.