The Giants and Buster Posey: a marriage built to last.

The team Friday announced an eight-year, $159 million contract extension for the 2012 National League batting champion and Most Valuable Player that assures Posey will remain a Giant through 2021, when he is 34.

Posey's new contract folds in the $8 million that he and the team already settled on for 2013, making it a nine-year, $167 million deal. It includes a $22 million option for 2022 that could make the contract worth $186 million and a full no-trade clause for the 26-year-old catcher.

That smashes the record for a Giants contract that Matt Cain set last year with his six-year, $127.5 million deal.

It also more than doubled the record for the largest contract for a player with less than three years of service time and represents the second-biggest contract for a catcher behind the eight-year, $184 million extension that Joe Mauer signed in 2010, although Posey might not be a catcher for the entire deal.

"Fasten your seatbelts," Giants President Larry Baer said when he announced the deal at the team's annual Play Ball luncheon, to a standing ovation.

At a news conference later in the afternoon, Baer called Posey's deal "by any measure, the longest and boldest commitment to a player the Giants have ever made," but with no trepidation about the nine figures at the bottom of the contract.