Francisco Cervelli won’t be hitting free agency after all.

The Pittsburgh Pirates announced they awarded their catcher with a new three-year deal. Jeff Passan of Yahoo Sports reported Cervelli‘s contract is worth a total of $31 million.

Rob Biertempfel of the Pittsburgh Tribune-Review reported Cervelli will earn $9 million in 2017, $10.5 million in 2018 and $11.5 million in 2019.

Cervelli wrote about the decision in the Players’ Tribune:

I want to thank the Pirates organization for believing in me. Thanks to my teammates: I’m proud to call you guys brothers. And last but not least, to the fans: You guys keep me going every night. That’s amore. Pittsburgh is a city with a lot of love. When I arrived here, people didn’t know who I was. But it didn’t take long for me to feel the love and respect that the people of Pittsburgh have. That’s why I am coming back.

Thank you for not giving up on me. I promise that I will never give up on this team.

Cervelli, 30, has spent the 2015 and 2016 seasons in Pittsburgh after a seven-year stint with the New York Yankees. An everyday starter for the first time in his career, Cervelli hit .295/.370/.401 with seven home runs and 43 runs batted in last season. His 3.8 wins above replacement were nearly triple his previous career best, per FanGraphs, putting him in a position to command a raise on the open market.

The Pirates and Cervelli avoided arbitration over the winter by agreeing to a $3.5 million salary for 2016, but it was clear a raise would be coming in any extension. Travis Sawchik of the Pittsburgh Tribune-Review reported Cervelli would take himself off the market for a three-year deal averaging about $13 million per season.

“We like Cervelli a lot and would welcome the chance to have him remain a Pirate in the event we are able to find a contract that makes sense for both the player and club,” Pirates general manager Neal Huntington said, per Sawchik.

Cervelli is off to another solid start this season, hitting .276/.386/.319 with four extra-base hits and 18 RBI in 33 games. He remains a steadying presence behind the plate as well, ranking second among qualified NL catchers in FanGraphs‘ defensive value added.

Complicating matters is the presence of Reese McGuire and Elias Diaz, two young prospects who are champing at the bit. McGuire was a first-round pick in 2013 and has shown promise working his way up through Single-A ball.

Diaz, 25, made his MLB debut last season after more than a half-decade in the minors. He probably tops out as a bench player, but the Pirates may have turned to him had the Cervelli deal fallen through.

If Cervelli keeps up his usual production in his everyday role, this contract will wind up making Huntington look smart. Cervelli was worth well over $20 million last season based on his WAR, so the Pirates would still break even with a slight regression.

Read more MLB news on BleacherReport.com