The St. Louis Cardinals have agreed to terms with pitcher Adam Wainwright on a one-year deal for 2019, the team announced Thursday.

Wainwright will be entering his 15th major league season -- all with the Cardinals, tying Bob Forsch for third among pitchers in terms of longevity with the team.

"Adam represents everything we think of when asked to describe a winning player, and a winning teammate," Cardinals chairman Bill DeWitt Jr. said in a statement. "His value to our team stretches far beyond the box score, and he showed by season's end that he is still ready and able to compete."

The 37-year-old right-hander is fifth on the team's career list with 148 wins and second with 1,623 strikeouts. He made just eight starts this season because of hamstring and elbow problems, going 2-4 with a 4.46 ERA.

"If you had asked me that question about two months ago, I would have already checked out on you," Wainwright said after his final start of the season when asked if he wanted to keep pitching. "But the way I'm feeling right now, if that is my last start, it would be kind of hard to walk away knowing the way I'm feeling right now."

The three-time All-Star, who has a career 3.32 ERA, has finished in the top three of the National League Cy Young voting four times.

"Adam has proven, when healthy, that he still has the ability and the drive to contribute at the highest level," Cardinals president of baseball operations John Mozeliak said. "We saw it in spring training, and again late in the season, that once he had overcome his ailments, he was prepared to give us a winning effort every time he took the mound. There is risk, but it is shared, and this deal gives us added depth as we look to 2019."

He had surgery on his right elbow to remove a cartilage flap last offseason, and he missed the 2011 season after having Tommy John surgery on his pitching arm.

Wainwright was the closer when the Cardinals won the World Series in 2006.

The Associated Press contributed to this report.