With only four months left before the start of the Summer Olympics in Rio de Janeiro, marketing executives throughout the world are well along in their hunt for the next big stars in sports — and in advertising.

After all, history has proved that athletes can sell products and, perhaps even more important, create the connections between brand and consumer that contemporary companies consider key to success.

There was a memorable moment during Wimbledon last summer, for instance, when Novak Djokovic — after losing a tiebreaker to Roger Federer in the men’s final — tried, and failed, to rip off his own shirt. For most of those watching, it engendered great amusement, but for Uniqlo, the Japanese brand that made the tennis great’s outfit, it was marketing gold.

“It was an incredible moment where the athlete was trying to express himself and Uniqlo’s quality almost gets in the way,” said Justin Kerr, chief merchandising officer and co-marketing director of Uniqlo U.S.A. “We couldn’t have planned it.”

Uniqlo also counts among its brand ambassadors the Japanese tennis player Kei Nishikori, the wheelchair tennis champion Shingo Kunieda and the golf pro Adam Scott. Their match-day clothing routinely sells out, Mr. Kerr said.

It’s a similar story for Tommy Hilfiger, which signed Rafael Nadal as global brand ambassador of its underwear, tailoring and TH Bold fragrance in August. According to Avery Baker, chief brand and marketing officer of the brand, sales of its underwear doubled year-over-year that month, and Tommy.com saw sales of men’s accessories, including underwear, rise 50 percent during the same period. She directly attributes both to Mr. Nadal’s involvement.

These brands aren’t alone in tapping major sports stars. While Nike, Adidas and Under Armour feature heavily, so do numerous luxury houses. Belstaff works with David Beckham, Ralph Lauren has long had a deal with the polo player Nacho Figueras, and the luggage company Tumi last year signed the Formula 1 driver Nico Rosberg. Watch brands also dominate: Mr. Nadal wears Richard Mille; Mr. Federer and Tiger Woods both work with Rolex; Lionel Messi and Serena Williams with Audemars Piguet; Rory McIlroy with Omega; Usain Bolt, Jérôme Boateng of Bayern Munich, and Pelé with Hublot; and Cristiano Ronaldo and Tom Brady with TAG Heuer.

(Of course, there also are big risks: Nike, TAG Heuer and Porsche are just some of the brands that suspended their contracts with the tennis star Maria Sharapova after she announced she had failed a drug test during the Australian Open this year.)

“For years luxury brands took out a print ad and that was enough, but now influence is a much more complex process,” said Tom Goodwin, senior vice president of strategy and innovation at Havas Media. “Working with sport is just part of a broader move to modernize.”

Many brands are targeting mass-market sports to access a broader set of consumers — soccer, with its estimated 3.5 billion global fans, is one of them.

“You wouldn’t traditionally associate football fans with luxury,” said Misha Sher, head of sport at the media agency MediaCom. “But rather than focusing on existing niche audiences that can already afford luxury product, these brands are now aligning with sports that can help them target the next generation of consumers.”

Jean-Claude Biver, chief executive of TAG Heuer and Hublot and president of the LVMH watch division, said soccer simultaneously reaches existing customers, future customers and the customers that will never buy from you, he said. “It’s really important to talk to all three. Everyone knows Ferrari, but how many people buy one each year? That is what we want to achieve,” he explained. “We want someone to say ‘Ahh, you have a Hublot, that is what I am dreaming of.”’

Reaching ever larger communities also is part of the aim, Mr. Sher said. “There are huge opportunities with the rising middle classes in developing markets with tens of millions of potential new customers ready to be engaged.” If a brand can count on a soccer personality like the Brazilian phenomenon Neymar, “who they already associate with, then you’re well on your way to landing a customer in the future,” he said.

Neymar, with his distinctive hairstyles, is one of the few athletes who has managed to command media attention beyond his sport, Mr. Sher added. Another is David Beckham.

“We weren’t attracted to the footballer but the man David Beckham and what he stood for,” said Gavin Haig, chief executive of the British fashion brand Belstaff. The English explorer Ranulph Fiennes was signed to front the brand’s spring 2016 men’s wear campaign for the same reason. “These partnerships have got to be done with integrity,” Mr. Haig said. “You’ve got to have shared values; that’s the beginning of an authentic relationship.” The partnership with Mr. Beckham also extended into two capsule collections.

Mr. Mille, the luxury watchmaker, has a similar approach. He doesn’t want his ambassadors merely to appear in campaigns, but actually to wear the watches while they play. From a technical standpoint that means developmental work to ensure the timepieces are light enough to not obstruct Mr. Nadal on the court, and resistant enough for the G-force of Felipe Massa’s Formula 1 car.

The athletes have to be involved in the process, as a result, Mr. Mille said. “I love to meet extreme complexity with extreme endurance, and my clients love that so much research and development goes into each piece,” he said. Just 50 of Mr. Nadal’s $775,000 watch, the RM 27-02, were available; they instantly sold out.

Digital content has also helped these partnerships to evolve. “We can now tell the story in a much more authentic way than we used to with traditional media, and really amplify our messaging,” Ms. Baker of Tommy Hilfiger said. Fans and so-called influencers generated 78 percent of the social media buzz surrounding the Nadal introduction, and just 22 percent came from the brand.

“Digital has created more oxygen for things to develop,” Mr. Goodwin of Havas said. “But that can be both good and bad. It can be an environment to thrive, or a place that accelerates the demise, so it makes it even more important that brands are thinking about the right sport, person and message coming together.”