Part of the gallery at the American Century Championship celebrity golf tournament last summer. The event, which is entering its 29th year, brings more than 40,000 people to Stateline, Nev., a casino town on the shores of Lake Tahoe. Lyle Setter/Icon Sportswire, via Newscom

STATELINE, Nev. — The 17th hole is the party spot. Nearby is a dock where fans motor up wearing swimsuits.

The football coach Herm Edwards remembers playing with the talk show host Maury Povich when his tee shot landed on a boat. Is that out of bounds? Mr. Povich asked. Mr. Edwards laughed. “No,” he said, “you can hit from there.” And so he did.

They were competing — or perhaps simply participating — in the annual American Century Championship, a celebrity golf tournament at Edgewood Tahoe golf course, a loose affair in its rules and its atmosphere. It’s not so much a sporting event as a gathering of famous and not-so-famous athletes and Hollywood talent on the shores of Lake Tahoe.

The tournament, entering its 29th year, sits in the not-taken-seriously corner of the sports landscape, with a reputation among golf-mad celebrities as a first-class frat party where short days give way to long nights at gambling tables and nightclubs.

This month the event got a new claim to fame, or infamy: According to The Wall Street Journal, a pornographic-film star was paid $130,000 before the 2016 election to conceal a past relationship with President Trump that began at the tournament.

The actress’s name is Stephanie Clifford, but in the movies she is known as Stormy Daniels. In a 2011 interview with In Touch magazine, Ms. Clifford was quoted as saying that she and Mr. Trump had their initial sexual encounter at a Harrah’s hotel near the golf course — less than four months after Mr. Trump’s wife, Melania, gave birth to their son.

A lawyer for the president, Michael D. Cohen, said in an email that Mr. Trump “vehemently denies any such occurrence.”

The tournament attracted broader attention when Pittsburgh Steelers quarterback Ben Roethlisberger, after playing at Edgewood in 2008, was accused of sexual assault by a Harrah’s casino hostess. No criminal charges were filed, and they settled a lawsuit out of court.

President Trump, shown at the American Century Championship in 2006. The tournament is owned and operated by NBC, which broadcast Mr. Trump’s show, “The Apprentice.” Dane Andrew/Zuma Press, via Newscom

The American Century is the biggest event of the summer here, bringing more than 40,000 people to this casino town in the foothills of the Sierras in search of some luck at the tables and a smile and an autograph from one of their heroes. The event is also a staple of summer programming for NBC Sports, the tournament’s owner, attracting up to 1.6 million viewers for its final-round coverage.

John Elway, Michael Jordan, Stephen Curry and Justin Timberlake are just some of the celebrities who have played the American Century Championship. They come for the promise of $600,000 in prize money, free hotel suites and swag collections of top-of-the-line items like sunglasses, wine, luggage and golf clubs.

“It’s the U.S. Open for all of us wannabes,” said the retired N.F.L. quarterback Trent Dilfer, a regular player in the tournament. “It’s the most beautiful place in the world. They treat you well. Lot of guys bring their families, but there are hard-core party nights, especially when the amateurs are in town.”

In 2006, Mr. Trump, an avid golfer, was among the 80 competitors. Ms. Clifford was not. She attended, along with other stars of Wicked Pictures, to promote the company’s films.

At the time, Mr. Trump’s reality TV show, “The Apprentice,” was in a ratings slide. He blamed Martha Stewart, the doyenne of domestic arts, for the slide. She headlined a second version of the show, which Mr. Trump helped produce, and it was floundering.

“I knew it would fail as soon as I first saw it,” he wrote to Ms. Stewart five months earlier in a letter that he made public. “Putting your show on the air was a mistake for everybody — especially NBC.”

Ms. Stewart did not play in the tournament. Only a handful of women do, primarily athletes.

Mr. Trump fit right in, though, at an event that depends more on outsize personalties than on golf skills.

“There’s 15 guys who can win it, and everyone else is just playing,” said Mr. Edwards, the former N.F.L. coach who was recently hired by Arizona State.

The celebrities are there to make the high rollers who attend the tournament feel as if they are in the middle of the huddle, locker room or board room.

Charles Barkley, the retired N.B.A. star, pouring tequila for the crowd at the Harrah’s hotel and casino one night during the 2007 tournament. Mr. Barkley is a fan favorite, despite his wayward shots on the course. Dane Andrew/Zuma Press, via Newscom

“During celebrity golf, there are million-dollar players,” Brandi Albanese, a Harrah’s casino hostess, said of the clients. “You see players that walk away with a million dollars. You see folks that give a million dollars to us.”

On the course, the former Bears quarterback Jim McMahon, who sometimes plays barefoot and always keeps a cold beer nearby, is a longtime crowd favorite. Mr. Curry, the Golden State Warriors star, made a special impression last year when he sprinted along a fairway so his playing partner, Green Bay Packers quarterback Aaron Rodgers, could throw him a pretend touchdown.

The former N.B.A. star Charles Barkley remains the most beloved player in the tournament’s field.

By day, he is a G-rated crowd pleaser. Once at the first tee, a little girl asked Mr. Barkley if he remembered her; she had given him a crayon drawing the year before. Mr. Barkley unzipped a compartment in his golf bag and produced the picture.

By night, he is a full-time free spirit, dedicated gambler and generous tipper. “He will buy cases of Corona and pass them out to people and do shots with them,” said Dory Tollner, 65, a bartender at the Hard Rock Cafe here. “He will tip a cocktail waitress a thousand bucks.”

True to form, Mr. Barkley scattered shots into trees and even clanged an errant one off a scoreboard on his way to losing a $50,000 wager to Chris Webber, then an N.B.A. star, for a second consecutive year and finishing next to last in the field in 2006.

Even truer to form, Mr. Barkley commandeered Harrah’s Center Stage, where Arthur Hervey — known as Arty the Party — has worked as a D.J. and hosted karaoke for more than 23 years. For nearly two hours, Mr. Barkley summoned people like Ray Allen, another N.B.A. star, to the stage to sing and dance while he dispensed double shots from 10 bottles of Patron tequila to the throngs surrounding the stage.

“I’m sorry, I gotta go,” he told them, according to a column in The Seattle Post-Intelligencer. “If I don’t gamble, I’ll break out in a rash.”

Mr. Barkley did not respond to multiple requests, by email and phone, for an interview.

Although Mr. Trump maintained a more low-key presence, he attended many of the hospitality events and chatted with competitors and fans, according to the more than 18 people interviewed for this article who either played in or were connected to the tournament. None said they had seen him with Ms. Clifford.

“It wasn’t like they were walking around with signs hanging around their neck,” said the Olympic skier Bode Miller, who was paired with Mr. Trump for a round. “It is a nice-looking crowd. It’s kind of funny. I look back at it now, and there was no way I’d ever think that he was going to be president.”

Mr. Trump finished 62nd in the 2006 American Century Championship. John Green/Icon Sportswire, via Newscom

Mr. Trump finished in 62nd place, 55 strokes behind the winner, the actor Jack Wagner.

At a party, Mr. Trump spent time with Mr. Hervey, the D.J. He remembered a request from Mr. Trump: “Do me a favor: Whenever you see me walk by, play ‘New York, New York’ for me.”

Few here know what to make of the recent stories about the president and the porn star.

“I don’t think this will have a negative impact,” said Wendy David, the mayor of South Lake Tahoe, Calif., which abuts Stateline. “The boats come in and they park on the lake. It attracts families that walk the course, watching their heroes, watching some of the sports legends.”

Mr. Dilfer, a 20-year veteran of the tournament, is often among the contenders.

“It doesn’t feel dirty to me,” he said. “My wife has massive groupie radar and she doesn’t worry.”

How did Ms. Clifford, the star of “Sexbots: Programmed for Pleasure” and “Operation: Desert Stormy,” became a part of the tournament?

Steve Stein, who ran the gift suite for the tournament in 2005 and 2006, said he made meeting Ms. Clifford and her fellow performers part of the package. At the time, he said, Wicked Pictures was thinking about starting an apparel line.

“Most everyone stopped for a photo and a shirt or hat,” said Mr. Stein, who still produces gift suites for major events under the name Product Hollywood.

There are photographs of Ms. Clifford with various members of the tournament field, including Mr. Trump, in front of a backdrop with a repeating Wicked logo. He posed wearing a shirt and hat bearing the logo of his Trump National Golf Club. Ms. Clifford wore a black halter top. Mr. Stein remembers the moment.

“My secretary took that picture,” he said.

As the United States soccer star Brandi Chastain made her way from room to room to collect the tournament swag, she spied a table where a hostess was handing out copies of the sex films starring Ms. Clifford.

“Something with the name ‘Wicked,’ but not the Broadway play,” Ms. Chastain said.

A two-time World Cup champion, Ms. Chastain said she had hoped to make a pitch to Mr. Trump about her potential as a cast member for “The Apprentice.” But she saw him only in passing. “I can’t decide if it’s a blessing in disguise or not,” Ms. Chastain said.