“I’m happy for him, and I’m happy for all players to see him get compensated fairly,” said the Milwaukee Brewers’ Ryan Braun, a former National League most valuable player who earns $21 million per season.

“For all of us as players, we want to see our best players sign the biggest contracts, and frankly I think the whole last week has been really positive for baseball players, if you look at Aaron Hicks, Miles Mikolas and Nolan Arenado,” Braun continued. “It’s been a bit of a contentious off-season, but I think for all of us as players it’s been an encouraging week to see all these guys compensated with contracts they’ve earned and deserve.”

Harper’s deal, which was confirmed by a person with direct knowledge of it who spoke on the condition of anonymity because the Phillies had not yet announced it, eclipses the 13-year, $325 million contract extension Giancarlo Stanton signed with the Miami Marlins before the 2015 season, two years before he was traded to the Yankees — Harper’s favorite team as he grew up in Las Vegas.

While the Yankees declined to pursue Harper, investing instead in pitching this winter, he attracted significant interest from the Los Angeles Dodgers and the San Francisco Giants, fueling speculation that he preferred to play on the West Coast. As it turns out, his Phillies contract does not even include an opt-out clause — the escape hatch the agent Scott Boras popularized more than 18 years ago in Alex Rodriguez’s first free-agent deal, with the Texas Rangers.

But Harper, 26, wanted clarity on his future, Boras said, and did not want the chance to opt out.

“He wanted to go to one city, stay there, build a brand and identity and recruit players,” Boras said. “He wants to tell players: ‘Come play with me.’ He knows it will help winning more if he’s with one team the whole time.”