MIAMI (AP) — Giancarlo Stanton signed his record $325 million, 13-year contract with the Miami Marlins at a news conference formally announcing the deal on Wednesday.

Stanton signed the deal while sitting next to Marlins owner Jeffrey Loria. The attendance-challenged franchise drew nearly 100 members of the media for the occasion.

The contract is the most lucrative ever for an American athlete, and the longest in Major League Baseball history. It includes a no-trade clause, and Stanton can opt out after six years and $107 million.

"We're here to celebrate a landmark agreement, not only for the Marlins organization but for our entire community," Loria said.

Stanton said the deal points the Marlins in a winning direction.

"This is one building block toward a better future and a new way of life down here in Miami," he said. "I'm glad to be here for my foreseeable future."

Stanton wasn't due to become eligible for free agency until after the 2016 season, and signing the outfielder to a long-term agreement was considered a long shot. The Marlins haven't reached the playoffs since 2003, and Stanton was skeptical about Loria making the necessary financial commitment to field a contender.

The Marlins hadn't held a celebratory news conference on such a scale since their last spending spree, just before their ballpark opened in 2012. They went 69-93, leading to a payroll purge.

Their average attendance of 21,386 was 28th among the 30 major league teams.

Stanton's contract tops the $292 million, 10-year agreement Miguel Cabrera agreed to with Detroit in March. He receives the first 13-year guaranteed deal in MLB history, topping an April 2012 agreement between Cincinnati and Joey Votto that assured the first baseman of $251.5 million over 12 years.

"It's an exciting day for Miami, my fans, our fans," Stanton said.

Stanton, who turned 25 on Nov. 8, is perhaps the game's most feared slugger. He has 154 homers, including a National League-leading 37 this year.

The two-time All-Star right fielder recently won the NL Hank Aaron Award, and was voted the NL's outstanding player in balloting by his fellow major leaguers. He won a Silver Slugger Award and finished second to Clayton Kershaw in NL MVP voting.

"He wants to be the man, and he's good enough to assume that mantle," Marlins president David Samson said.

Stanton's season ended on Sept. 11 when he was hit in the face by a pitch and suffered fractures in his face and other injuries. Despite missing the final 17 games, he led the NL in homers and slugging for the Marlins, who went 77-85 but ended a three-year streak of last-place finishes in the NL East.

The Marlins have said they're not concerned the injuries will have lingering effects.

While Kevin Brown was the first player to break the $100 million barrier in 1998 and Alex Rodriguez became the first to top $200 million just two years later, it took 14 more years to produce baseball's first $300 million man.

Stanton did a double take when asked if the amount of deal was embarrassing to him.

"Embarrassing to me? Not exactly," he said. "I know I have a lot of expectations to live up to, which I need to do and am willing to do. This isn't like a lottery ticket. This is the start of new work and a new job. It's a huge responsibility, and one I'm willing to take."

Stanton took the podium for his news conference wearing a tailored blue suit and a grin, showing no signs of the beaning that ended his season Sept. 11. He hasn't hit a ball since but said he'll return to the batting cage beginning in mid-December in his native California.

"I'll probably take a moment before I get into that box, but it'll be good," he said. "I'm excited for it."