It’s the end of an era in San Francisco. Although the 42-68 last-place Giants plan on contending next season, they’ll almost certainly do so without Matt Cain, the former face of a pitching staff that was among the game’s best.

To little fanfare, manager Bruce Bochy announced on Thursday that Cain was out of the Giants’ starting rotation and would be used as a long reliever for the rest of the season. Cain is in the final year of a six-year, $127.5 million contract he signed in 2012.

The contract includes a $21 million vesting option for 2018 if Cain pitches 200 innings this season, but he won’t reach that total. Once the option does not vest, it becomes a team option with a $7.5 million buyout. The Giants will buy out the contract, and in all likelihood his tenure with the only team he’s ever played for will come to a close.

Cain was excellent in the first year of the contract in 2012. He tossed the 22nd perfect game in major league history, and was the ace of a pitching staff that led the Giants to their second World Series title in three seasons.

From his debut as a 21-year-old in 2005 through 2012, Cain had a 3.27 ERA, 3.65 FIP, and 4.19 xFIP. Among big league pitchers, Cain’s 28.4 fWAR during that span was 11th-best in baseball, and the league’s .290 wOBA against him was sixth-best among pitchers with at least 1,000 innings.

Stealing Brandon Belt Advanced metrics suggest that Brandon Belt is better than people think. Could a team steal him from the Giants at the deadline?

As the gap between his ERA and xFIP suggests, Cain found success in large part by suppressing home runs. Although he had baseball’s fourth-highest fly ball rate from 2005-12, his 6.8 percent home-run-to-fly-ball ratio during that span was easily the best in the sport.

However, Cain’s fortunes changed in year two of the contract. His 2013 ERA (4.00) finally caught up with his xFIP (3.88), and the following year things got worse. They haven’t improved since.

In 346 innings since 2014, Cain’s 5.20 ERA, 5.05 FIP, and 4.78 xFIP are all second-worst in the National League. His HR/FB rate more than doubled from where it was from 2005-12, all the way up to 14.0 percent, the 17th-highest among among 164 starting pitchers with at least 250 innings since 2014.

While Cain threw at least 200 innings every year from 2007 to 2012, he has only eclipsed 100 in two of the last five years because of poor performance and numerous injuries, including an elbow operation in 2014.

With less than two months remaining on his contract, the Giants finally have seen enough. Whatever the precise cause of his decline, it has become career-threatening. When Cain throws his final pitch of 2017, it could be the last of his career.

If that’s the case, Matt Cain will have had a solid and memorable big league career. Despite his recent struggles, he still boasts a 3.66 ERA and 3.91 FIP in 2,067 innings, good for 29.5 fWAR, which is fifth-best among National League pitchers since 2005. He is the owner of three World Series rings (even though he did not pitch in the 2014 postseason) and has a 2.10 ERA in 51.1 postseason innings, including zero earned runs allowed in 21.1 postseason innings in 2010.

No matter what he decides to do next, Matt Cain will always be remembered among Giants fans for his role in turning a what was a lackluster organization in the mid-2000s into a perennial contender, for his perfect game in 2012, and for leading the Giants to multiple World Series titles. He will forever stand among the likes of Tim Lincecum, Pablo Sandoval, Madison Bumgarner, and Buster Posey as the men most responsible for what would become one of the greatest runs of success in baseball history.

Ben Kaspick is a contributor for Beyond the Box Score and RotoGraphs, and the owner-operator of CoveCast, a saber-slanted San Francisco Giants podcast. You can follow him on Twitter @benkaspick or @Cove_Cast.