The Cardinals agreed to a one-year deal with the veteran right-hander Thursday, bringing Wainwright back to the only major league team he's pitched for. The 37-year-old Wainwright has been with St. Louis since making his big league debut in 2005.

"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."

Wainwright made just eight starts this season because of hamstring and elbow problems, going 2-4 with a 4.46 ERA, but he pitched four times in September as the Cardinals made an unsuccessful bid for a postseason spot. After his final start Sept. 28, he sounded like someone who wanted to try to keep pitching.

"If you had asked me that question about two months ago, I would have already checked out on you," Wainwright said at the time. "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."

A three-time All-Star, Wainwright is fifth on the Cardinals' career list with 148 wins and second with 1,623 strikeouts. He was a closer for the Cardinals when they won the World Series in 2006. St. Louis also won a title in 2011, but Wainwright did not pitch that year.

Wainwright went 20-9 with a 2.38 ERA in 2014, but he's posted a 4.54 ERA over the four seasons since.

"Adam has proven, when healthy, that he still has the ability and the drive to contribute at the highest level," said John Mozeliak, the Cardinals' president of baseball operations. "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."

---

More AP baseball: https://apnews.com/tag/MLBbaseball and https://twitter.com/AP-Sports