One hundred and seventeen days later, Bryce Harper has a new home, and it’s the one many predicted from the start.

The superstar outfielder is staying in the NL East, agreeing to a deal with the Phillies on a baseball-record 13-year, $330 million contract, The Post’s Joel Sherman confirmed.

The deal tops Giancarlo Stanton’s then-record $325 million extension he inked with the Marlins in November 2014, though the $25 million per year comes up short of the highest average annual record for a position player, which Nolan Arenado boasts with $32.5 million per year. This certainly seems like the “stupid money” owner John Middleton pledged to spend at the start of the offseason.

The former National flirted with the Dodgers and Giants, meeting on multiple occasions with those teams, and there was the reported belief he preferred the Dodgers, who are close to his Las Vegas home. But the 26-year-old Harper took the money — don’t they always? — and likely makes the Phillies the favorite in the division, part of a blockbuster offseason that also includes J.T. Realmuto, Andrew McCutchen, David Robertson and Jean Segura. The six-time All-Star and 2015 NL MVP has never gotten past the divisional round of the postseason.

Harper is coming off a disappointing season by his standards, posting a .249/.393/.496 slash line with an .889 OPS, 34 home runs and 100 RBIs. But he produced a 1.008 OPS the year before in 111 games with a 4.7 WAR and is clearly one of the sport’s premier players.

The contract has no deferrals or opt-outs. Harper will be eating cheese steaks for a long time.

The Nationals, with whom Harper spent his first seven years, will get a 2019 supplemental first-round pick as a result of losing Harper. He had turned down the team’s $17.9 million qualifying offer.