Manager Gabe Kapler heard the big news from fans in the stands during the Philadelphia Phillies' spring training game. His team won the Bryce Harper sweepstakes, agreeing to a 13-year, $330 million deal with the free-agent outfielder, league sources told ESPN's Jeff Passan on Thursday.

Harper's deal includes a no-trade clause and has no opt-outs, league sources told ESPN, indicating that he is committed to the Phillies for possibly the rest of his career.

Fans showed Kapler and the Phillies their phones, giving updates as reports leaked out. He said he asked them where they were getting the info, afraid it wasn't legitimate.

"If the reports are true, it's a huge moment for our baseball team," Kapler said after the game. "We get a lot better on the field, and Bryce Harper is a great teammate. We'd love to have him in our clubhouse, if the reports are true."

The 2015 National League MVP and still only 26 years old, Harper was one of the top prizes in this year's crop of free agents. Infielder Manny Machado agreed to a 10-year, $300 million deal with the San Diego Padres, and it was assumed Harper's total would exceed that contract. Not only did he do that, his total beats Giancarlo Stanton's 13-year, $325 million extension signed with the Miami Marlins.

Harper receives a $20 million signing bonus and a $10 million salary for this season. He will be paid $26 million annually from 2020 to 2028 and $22 million per season from 2029 to 2031, Passan reports.

"We had average values of $45 million offered on shorter-term deals," Harper's agent, Scott Boras, told the New York Post. "We had a full buffet."

MLB Network was the first to report that Harper and the Phillies were closing in on an agreement.

"The goal was to get the longest contract possible," Boras told the Post. "Bryce wanted one city for the rest of his career. That is what I was instructed to do. It is very difficult in this time to get length of contract that takes a player to age 37, 38, 39."

The Phillies, Giants and Dodgers were vying for Harper. The Dodgers were interested in signing him to a short-term deal. The San Francisco Chronicle, citing multiple sources, reported the Giants went as high as 12 years and $310 million with their offer.

Kapler, who said Harper would likely hit third or fourth in the lineup, met with Harper during the offseason courtship.

"One thing we know about Bryce is that he's an intense individual," Kapler said. "He plays the game especially hard."

According to contract details obtained by The Associated Press, Harper would earn an extra $50,000 each time he is an All-Star, wins a Gold Glove or a Silver Slugger or is selected League Championship Series MVP. A World Series MVP trophy would be worth an additional $100,000.

He would get $500,000 if he is league MVP, $50,000 for finishing second in the voting and $25,000 for third. Following news of Harper's decision, his odds to win the 2019 NL MVP award moved from 6-1 to 5-1 at the Westgate Las Vegas SuperBook.

In addition, Harper gets a hotel suite on road trips and the right to purchase a suite for games at Citizens Bank Park.

Harper isn't the only upgrade to the roster for the Phillies, who were 80-82 to finish third in the NL East last season. They traded for catcher J.T. Realmuto and infielder Jean Segura and signed outfielder Andrew McCutchen and reliever David Robertson.

"It's exciting. He's a superstar player," said starter Aaron Nola of Harper, according to the Philadelphia Inquirer. "We were already a better team without him, but now that we got him, it takes it up a notch."

Nola signed a four-year extension of his own this offseason. He was asked by NBC Sports during the Phillies' game Thursday what the Harper signing meant.

"We're not rebuilding anymore, and that's exciting," Nola said, adding: "We are ready to contend again."

Phillies pitcher Zach Eflin told NBC that the team already had sky-high expectations but adding Harper takes it to another level.

"We are all excited. I'm sure he's excited," Eflin said. "It's going to be a lot of fun for many years to come."

Eflin was asked what this says to the fans. "Anybody can look at it and see it's time to win," he said.

Former Washington Nationals teammate Max Scherzer said Harper's 13-year contract is good for the game. It will also provide Scherzer with a new challenge as Harper moves within the NL East.

"Hey, we get to face him," Scherzer said. "It will be fun."

Washington manager Davey Martinez was happy for his former player.

"He deserves it," Martinez said. "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 that division a little bit tougher. But I wish him all the best, I really do. Good for him."

Harper is a six-time All-Star and was the NL Rookie of the Year in 2012 who spent his first seven seasons with the Nationals. He is a patient hitter, known for hitting a lot of homers and drawing a lot of walks, and has a .279 average with 184 homers, 521 RBIs and a .388 on-base percentage over his career.

He hit .249 with 34 home runs and 100 RBIs for Washington last season. He struggled for much of the first half but won the Home Run Derby during All-Star festivities at Nationals Park and hit .300 with 11 home runs, 46 RBIs and 46 runs scored in 223 at-bats after the break. He led the NL in walks with 130 and ranked fifth in on-base percentage (.393).

Harper is going to a ballpark that fits him well. He has 14 career home runs at Citizens Bank Park, the most round-trippers at any road ballpark in his career. His .564 career slugging percentage at the park ranks first among 71 players with at least 200 plate appearances there. Rhys Hoskins, who will likely hit directly behind Harper in the batting order, ranks second on that list (.562).

According to Baseball Prospectus, Citizens Bank Park is tied with Miller Park as the most home-run friendly NL stadium for left-handed batters in the past three seasons.

One of the main topics of discussion for the Nationals -- and all of Major League Baseball -- going into the offseason was whether the team would be able to sign Harper to a long-term deal. According to reports, he turned down a 10-year, $300 million offer from the Nats.

He went into free agency after turning down the Nationals' qualifying offer for $17.9 million. Because the Nationals are over the luxury tax, they would get a supplementary pick after the fourth round in compensation for Harper.

Knowing his team missed out, Giants infielder Brandon Belt praised San Francisco's outfielders, but he did tell the Chronicle of Harper: "It kind of sucks it wasn't us."

Harper led the major leagues in 2015 with 42 homers and hit .330 with 99 RBIs. He slumped to a .243 average with 24 homers and 86 RBIs in 2016 then rebounded to hit .319 with 29 homers and 87 RBIs in just 111 games in 2017.

"He's shown the type of player he is, and now he's a grizzled veteran,'' Nationals general manager Mike Rizzo said Nov. 7. "He has done a lot in the game already, and he is just scratching the surface."