On Tuesday morning, a fan of Ryan Lochte could have logged onto the star American swimmer’s Web site and purchased Ryan Lochte T-shirts, Ryan Lochte sunglasses, Ryan Lochte hats. On Tuesday evening, a television viewer might have stumbled upon an ad for Subway featuring Michael Phelps, Lochte’s chief rival, hawking sandwiches.

But Wednesday morning, 10 days before Lochte, Phelps and their U.S. Olympic teammates participate in the Opening Ceremonies for the London Games, Lochte’s paraphernalia will be unavailable, and Phelps’s ads will be on hiatus.

The U.S. Olympic Committee, in conjunction with the International Olympic Committee, begins a moratorium on athletes marketing themselves through companies that aren’t official Olympic sponsors Wednesday, and it holds through Aug. 15, three days after the Games conclude.

The rules date back to the days when all Olympic athletes were amateurs, and companies tried to profit by tangentially associating themselves with medal winners. This tactic, which the USOC calls ambush marketing, led to the current restriction, known as Rule 40, included in the athletes’ code of conduct. Violate the pact, and the result could be “sanctions including, ultimately, disqualification from the Games,” according to a USOC pamphlet distributed to athletes.

“Ambush marketing seems to be an issue that continues to rear its head in every Games,” said Lisa Baird, the USOC’s chief marketing officer. “There are ambush marketers out there that want to imply an association with the Olympics. They’ll take terminology; imagery, and they will get very close or crossing the line to really imply that they are a sponsor. That hurts us.”

Several athletes and their representatives, though, believe the athletes suffer more. “Absolutely terrible,” said Erika Wright, who represents Lochte. Evan Morgenstein, the chief executive of PMG Sports — whose client list includes several prominent swimmers, gymnasts, skiers and other athletes — said the USOC “has rendered these kids indentured servants.”

“It’s the big issue at this time of year, because the athletes’ eligibility is at stake,” said Peter Carlisle of Octagon, Phelps’s longtime agent. “Whatever your opinion might be, the stakes are high.”

The IOC allows official association with the Games — use of the Olympic rings, images of venues and the like — to 11 “worldwide” sponsors, companies such as Coca-Cola, General Electric and McDonald’s. Such deals have been estimated to be worth $100 million for every four years, a period encompassing one Winter and one Summer Games.

The USOC receives 20 percent of the revenue generated from those deals. The USOC also has relationships with a long list of companies — Deloitte, Hilton, Kellogg’s, Nike, among others — that grants those companies rights to use Olympic themes in its ads domestically. Those relationships go a long way toward funding the U.S. Olympic program.

“In a sense, the Olympics are kind of favoring the sponsors over the athletes,” said Bob Dorfman, a sports marketing expert at Baker Street Advertising in San Francisco. “But that’s where the money comes from.”

The rules have been in place for decades, but they have been increasingly contentious as more athletes try to build their individual brands around their Olympic performances. This applies to someone like Phelps, who won a record eight gold medals at the Beijing Games and has become a marketing juggernaut. But it also affects lesser-known Olympians. Take Conor Dwyer, a 23-year-old swimmer who will make his first Olympic appearance in London. Wright, his agent, wanted to help him sell shirts that say, “Go Dwyer” or “Team Dwyer” during the Games. The USOC said no.

“They take your name away,” Wright said. “It’s almost like they stifle free speech. . . . The underlying premise behind the rules, there is a good purpose to it. But in application they carry it too far. They scare the athletes to death.”

In the social media age, these rules have extended into athletes’ relationships with their fans. The pamphlet distributed to athletes says Olympians are “encouraged” to use Twitter and blogs to document their experiences. But they “are not permitted to promote any brand, product or service within a posting, blog or tweet.”

“They can’t even say, ‘I’m listening to my iPod today, and I heard this great song during my workout,’ ” Dorfman said. Apple, the iPod’s manufacturer, isn’t an Olympic sponsor.

The USOC’s Baird said enforcement of the rule is “always on a case-by-case basis,” and there are occasionally waivers granted to athletes who have long-standing relationships with companies that are not “trading off the athlete’s Olympic association.”

But representatives believe the rule can impact almost any deal. Phelps, for instance, serves as a spokesman for Head and Shoulders shampoo, a Procter & Gamble product. Those ads can continue to run during the Olympics, because P&G is a worldwide sponsor. But when Carlisle sits down with a company such as Subway, whose competitor McDonald’s is a worldwide Olympic sponsor, the potential value of a deal is less because the association between Phelps and the company is on pause during Phelps’s most visible time in the spotlight.

The final bylaw to Rule 40 contained in the Olympic Charter, reads: “The entry or participation of a competitor in the Olympic Games shall not be conditional on any financial consideration.”

“Stating you can’t authorize any athlete to use his name, likeness or image for any promotional reasons — isn’t that conditional on financial consideration?” Carlisle said. “I don’t see how you reconcile the rule itself with that bylaw.”

There is, though, no expectation among athletes and their representatives that the rule will be rescinded.

“This is a way they can guarantee a $50-to-$100 million investment as a major sponsor of the Olympics, that nobody’s going to undermine it,” Dorfman said. “When you’re dealing with this kind of money, with these kind of high-powered sponsorships, I think it kind of has to be there.”