Posted by Sabrina B. @gametimegirl

The San Francisco Giants have worked out a new contract for All-Star Matt Cain that will make him the highest-paid right-handed pitcher in baseball history.

Cain, who was set to earn about $15 million in the last year of his contract, will have that deal ripped up and will get six years and $127.5 million, sources told ESPN The Magazine’s Buster Olney. He gets a player option for 2018 that can bring the total value of the contract to $141 million. Cain receives a full no-trade clause.

The previous record for a right-handed pitcher was Kevin Brown’s $105 million contract the Dodgers gave him after the 1998 season.

The 27-year-old Cain went 12-11 last season with a 2.88 ERA, reaching 200 innings for the fifth straight season. He also didn’t allow an earned run during the entire 2010 postseason, when the Giants pulled off an improbable World Series championship.

Giants general manager Brian Sabean has said for years his priority is to keep his pitching staff intact for the long haul — and that hasn’t changed. Two-time NL Cy Young Award winner Tim Lincecum reached a $40.5 million, two-year deal in late January.

ESPN