ST. LOUIS (AP) – Adam Wainwright will pitch for the St. Louis Cardinals next season, choosing to return for an 18th and final year with the club even as longtime teammates Albert Pujols and Yadier Molina head off into retirement.

The 41-year-old Wainwright agreed Wednesday to a $17.5 million, one-year contract that includes $10 million in deferred pay and the chance to earn $1 million in bonuses for starts.

He informed the NL Central champions of his decision to return shortly after they were eliminated by the Philadelphia Phillies in the wild-card round of the playoffs. Wainwright did not pitch in either game in part because he had struggled with his delivery late in the season.

Trending: Senior from STL high school shooting speaks at town hall

“I do tend to think the way the season ended led even more to me coming back,” Wainwright said Wednesday, “because I just didn’t like that. I don’t like gong out like that. I wasn’t performing like I know I should have been performing. Wasn’t helping the team like I knew I should have been helping the team. We didn’t win. I love my teammates.”

“But looking back on it now, it just seemed like everything that happened led me to coming back one more year,” he said.

Asked whether it would be just that — one final year — he replied: “Yes.” But then Wainwright made it clear that he has no interest in answering questions about retirement every week, instead imploring folks to “just let me go out and pitch.”

Wainwright finished 11-12 with a 3.71 ERA in 32 start, his first losing season in which he made at least 20 starts. He won just twice over his final six starts, though, and had a 7.22 ERA while dealing with what he called a “dead arm.”

Wainwright’s deal includes $1 million payable each July 1 from 2024-33 and the chance to earn $500,000 each for 28 and 30 starts.

He gets a full no-trade provision and a hotel suite on road trips. He would earn $500,000 for finishing among the top 10 in Cy Cy Young Award voting, $50,000 each for making the All-Star team, winning the Leaguue Championship Series or World Series MVP awards or a Gold Glove, and $25,000 for a SIlver Slugger.

Wainwright earned $17.5 million on a one-year deal last season.

“We all know how competitive he is, we know how special he is in that clubhouse and what he means to this organization,” Cardinals president John Mozeliak said, “so we’re just glad we could get it done.”

Video: 8 more businesses in STL broken into by thieves

Wainwright heads into next season needing five wins to reach 200 . The right-hander is 15 behind Jesse Haines for the second-most wins in franchise history; Bob Gibson is the leader with 251 of them.

Wainwright and Molina set the major league record for career starts as a battery last season, eventually hitting 328 starts together. But with Molina heading into retirement, Andrew Knizner is in line to be the everyday catcher, though Mozeliak did indicate Wednesday that the club would be in the market for help behind the plate.

“We’re super excited that he’s coming back, and we understood that he had interest in pitching again,” Mozeliak said. “He and I started talking about this in early September, and obviously the September didn’t go as he wanted it to, but we really do feel like there’s something left in that tank.”