Long-time San Francisco Giants pitcher and three-time All-Star Matt Cain announced on Wednesday that he’ll retire following the 2017 season.

Here's what #SFGiants pitcher Matt Cain said this morning pic.twitter.com/9YIMskVVLI — KNBR (@KNBR) September 27, 2017

“I just wanted to let you guys know that I think that Saturday and this weekend will definitely be my last time putting on a Major League (Giants) uniform, and I can’t see myself going anywhere else to be able to play with another team,” Cain said. “This organization has meant so much to me. It’s meant so much to my family. It’s something that’s dear to my heart. I’m just grateful that it’s been a part of my life. I’ve enjoyed it — enjoyed it so much.”

Cain’s career can really be divided up into two distinct parts. From 2005, when he broke into the league, through 2012, he was one of baseball’s best pitchers. In those years, Cain posted a 3.27 ERA, 1.17 WHIP, made three All-Star teams, pitched a perfect game, and hit 200 innings or more in each season from 2007-2012.

From 2013 on, though, it’s been a struggle. In that time, he’s put up a 4.86 ERA, 1.39 WHIP, and has only topped even 100 innings twice and has never gone above 184.1.

Cain was an integral part of San Francisco’s World Series wins in 2010 and 2012, with injuries keeping him from the postseason in 2014.