The monotony of spring training had gotten to David Ortiz.

After another hitless game in a month filled with 0-fers, the iconic Red Sox slugger admitted yesterday he’s bored with the exhibition schedule. And then there was the matter of his long-held desire to add one more year to his contract. Ortiz’ agent, Fern Cuza, had just concluded another round of negotiations with Sox president Larry Lucchino and general manager Ben Cherington and was waiting outside the clubhouse, perhaps with news that a deal was nigh.

“Hopefully,” Ortiz said quietly and trudged out the door.

By suppertime, it was done. Ortiz signed an extension that will pay him $16 million in 2015, a $1 million raise from his salary this year, according to a source familiar with the situation. The agreement also includes a vesting option for 2016 based on plate appearances and a club option for 2017, by which time Ortiz will be 41.

And so, Big Papi almost certainly will finish his career with the Red Sox — and without the hassle of having to beg for an extension after each season.

How’s that for a way to break the monotony?

“With this agreement, we have near certainty that David Ortiz will finish his career in a Red Sox uniform, which is something we have all wanted and that we are all proud of,” principal owner John Henry said in a statement. “We are so proud to have this ambassador of our game with us as he continues on this road to Cooperstown.”

In negotiating the extension, the Red Sox wagered that Ortiz will continue to be a powerful middle-of-the-order force, and save for his meaningless 2-for-35 spring training slumber, there isn’t much to indicate otherwise. If anything, he’s as good as ever. The only link to each of the Sox’ titles in 2004, 2007 and 2013, he batted .309 with 30 homers, 103 RBI and a .959 OPS last season before a historic World Series in which he went 11-for-16 (.688).

History isn’t typically kind to sluggers in their late 30s. Only 13 players have hit at least 25 homers in their age-38 season, and only six had an OPS of .900 or better. Barry Bonds, Hank Aaron, Willie Stargell, Ted Williams and Jim Thome are the only players to hit at least 25 homers with an OPS greater than .900 at age 39.

But Ortiz seems to be following the trajectories of Stargell and Frank Thomas, big-bodied sluggers who maintained their production late in their careers. Thomas hit 39 homers with a .926 OPS at age 38, and 26 homers with an .857 OPS at 39. Stargell hit 28 homers with a .949 OPS at age 38, then 32 homers with a .904 OPS and an NL MVP award at 39.

If Ortiz takes that path, committing to him through 2015 will be no gamble at all.

It has been nearly four months since Ortiz expressed his desire to extend the two-year, $26 million deal that he signed before last season, at which point he was coming off a serious Achilles injury that lingered through spring training. Based on days spent on the active roster last year, he reached enough incentives to boost his 2014 salary from $13 million to $15 million, tying him with first baseman Mike Napoli as the Sox’ highest-paid players.