News of Bryce Harper’s deal with Philadelphia reached the Nationals as they played an exhibition game against the Red Sox. Max Scherzer said it will be “fun” to play against him. (John McDonnell/The Washington Post)

FORT MYERS, Fla. — On the 123rd day of Bryce Harper’s free agency, some 2,400 miles from Las Vegas, where teams had cycled in for meetings and speculation had been tossed around like poker chips, the Washington Nationals played a baseball game.

Then Harper agreed to a 13-year, $330 million deal with the Philadelphia Phillies on Thursday afternoon. Then the Nationals played some more.

“He deserves it,” said Nationals Manager Dave Martinez, who learned of the deal while walking off the field after a 13-5 loss to the Boston Red Sox at JetBlue Park. “He’s one of the best young players in the game. I’m glad I got to spend a year with him. We’ll always be close. He makes our division a little bit tougher. But I wish him all the best, I really do. Good for him.”

“Breaking news! Bryce Harper signs with the Phillies!” a fan yelled in the bottom of the seventh in an otherwise quiet stadium, though apparently that didn’t reach Martinez in the Nationals’ dugout. By that point, it sounded like a tired proclamation of old, expected news. That’s how fast information travels these days. Word reached the Nationals in the bottom of the fifth, and as reporters jogged toward the visitors clubhouse, Max Scherzer wondered whether Harper’s deal would be worth more than New York Yankees outfielder Giancarlo Stanton’s 13-year, $325 million extension signed in 2014.

Scherzer was soon asked whether he had thoughts on Harper, 26, signing with a division rival. And Scherzer did.

“I mean the news is breaking as we speak, so . . . I hope he gets a 10-year deal,” Scherzer said before adding, “And if it is with the Phillies, hey, we get to face him. It’ll be fun.’”

Then Scherzer was told it was for 13 years and more money than has ever been packed into one U.S. professional sports contract.

“Obviously a 13-year deal, that’s good for the game,” Scherzer said. “To be that young and to be a free agent, you know, teams are flush with money, and it’s good to see teams spend it.”

The deal ensures that the Nationals and Harper will be seeing a lot of each other — 247 times in the next 13 regular seasons, to be exact, if Harper stays 100 percent healthy and plays out the entire deal. The first matchup will be a two-game set in Washington on April 2 and 3, the second series of the season, before three games at Citizens Bank Park in Philadelphia a week later.

The Nationals offered Harper a 10-year, $300 million deal before his free agency began, and Harper passed to test a market that never grew as big as expected. The final mix included the Phillies, San Francisco Giants and Los Angeles Dodgers, with the Nationals remaining only because of the franchise’s long-standing relationship with Harper and agent Scott Boras.

But Washington had largely moved on since December and certainly since the start of spring training, with some players and people in the organization growing apathetic as negotiations dragged into a fourth month. The Nationals had even replaced a handful of Harper photos at their spring training complex in West Palm Beach, though a few of him in group shots remain on the walls.

Harper was drafted first overall by the Nationals in 2010, debuted at age 19 in 2012 and, for seven seasons, was the centerpiece of a perennial contender. In that time, he endeared himself to Washington with his brash style of play, neck-jerking hair flips and a bat that helped him win the National League MVP award in 2015.

Now the fans who watched him grow from teenager to megastar will need to decide how to greet him in his first game back. And his former coaches and teammates will prepare to face him.

“I’m sure the boys are going to be excited to play against him,” Martinez said. “And I know he’s going to be excited to play against us.”

Most of Harper’s teammates were back in West Palm Beach when the deal became public; the Nationals typically take minor leaguers on long spring training trips. Ryan Zimmerman, Trea Turner, Stephen Strasburg, Anthony Rendon and others who played with Harper in past seasons, surely will be pressed for thoughts in the coming days and weeks. Scherzer traveled the 2½ hours to Fort Myers to throw two scoreless innings on Thursday. Juan Soto, still 20 years old, is a major league regular but young enough to ride a bus across Florida.

They, along with Martinez, expressed excitement for Harper getting such a long, lucrative deal. Soto debuted as a 19-year-old last season, the same age Harper was when he broke into the big leagues, and Harper was a mentor to him from when he first stepped into the Nationals’ clubhouse.

“He helped me a lot. The first day I get here he was the first person to go to me and give me a hug and say: ‘Hey, whatever you need I am going to be here. Just let me know,’ ” said Soto, whose locker was just a few down from Harper’s last season, after Thursday’s game. “I feel very good with him. He always tried to help me with hitting, in the outfield, whatever. He was good.”

He still will be nearby, just a short drive north from Nationals Park. just close enough for Harper and Soto to be competing and be compared for years to come.

Martinez flipped his focus away from Harper during the winter — thinking the situation was beyond his control — and has since centered on the 58 players he has in spring training. But he will need to pour over the outfielder’s film and scouting reports, soon and well into the future, because the season is nearing and the National League East will be baseball’s most competitive division.

The Nationals’ sixth exhibition ended in an eight-run loss Thursday, and by the end of it, their first matchup with Harper’s Phillies was a little more than a month away.

Read more Nationals news:

Analysis: Even over 13 years, Harper’s Phillies contract isn’t worth it

Trevor Rosenthal impresses right away for Nationals

Nationals reliever Koda Glover is shut down with forearm strain

Patrick Corbin’s first spring start came far from West Palm Beach. That’s significant.

Dave Martinez, in second spring training, shows growth in shifted approach

Erick Fedde added 20 pounds hoping to be more durable — and the Nationals’ fifth starter‘‘‘