The nine-day track and field world championships, which end Sunday, have had more than a few rough spots.

This is the biggest international sports event post-Soviet Russia has hosted. And the gathering of nearly 2,000 track and field athletes has been regarded as an informal indicator of how well Russia will do in six months as host of the Winter Olympics in the resort area of Sochi.

Comparing one event to the other is always tricky, but clearly there are lessons to be learned. Athletes spoke highly of the organization and facilities. It’s off the track that troubles appeared.

The most notable problem also may be the most intractable. Russia’s recent passage of a law banning dissemination of pro-gay “propaganda” to minors has sparked widespread criticism in the West, including calls to boycott the Sochi Olympics. While athletes at the worlds mostly tried to keep the issue at arm’s length — saying they were too focused on competing or that politics and sport don’t mix — a small, quiet gesture brought the matter center stage.

Swedish high jumper Emma Green Tregaro posted a photo of her fingernails painted in the colors of the rainbow emblem of the gay pride movement on the Internet. She said she did it to support tolerance. It was the first overt sign among the athletes in Moscow of objection to the Russian law.

Hours later, Russian pole vaulter Yelena Isinbayeva said the Swede’s move was disrespectful to Russia, adding that she supported the law and that Russians are “normal, standard people.” American runner Nick Symmonds then piled on — despite an earlier vow to hold his tongue while in Moscow — by denouncing Russia for its “atrocities.”

Isinbayeva tried to backpedal on Friday, saying her remarks were misunderstood because she had been speaking in English rather than Russian. But it left the sense that the woman who is an international star for her exuberant performances had tainted the gold she won Tuesday. While the issue has receded for now, its volatility is clear and likely to persist.

Hoping Russia will repeal the law is more than a long shot. Parliament passed it by a vote of 436-0, and a respected polling agency found 76 percent of the population supports it. Some Russian officials have suggested the law would not be enforced during the Olympics, but the legality of that is questionable. In any case, it would either be a tacit admission that the law is wrong or an uncharacteristic show of submissiveness to Western pressure.

Other problems should be easier, in theory, to address — such as making sure bus drivers have maps.

“The driver didn’t know where he was going and took us for a trip around Moscow,” New Zealand runner Zane Robertson said about his three-hour trip from the airport to the hotel, a distance of about 20 miles. “We were frustrated. We were almost pounding the seats. It took longer than it did to fly here from Switzerland.”

Shuttles between some official competition hotels and Luzhniki Stadium often took up to 90 minutes because of wandering drivers.

Moscow’s famously efficient subway system was a faster alternative, but foreign users complained that confusion sets in once off the trains because of a lack of directions.

“There’s not much signage,” said spectator Roger Cross of Southampton, England, adding that walking from the nearest subway station required a detour on a path where “there are tree roots and things.”

Transportation will also be a key issue for the Sochi Games. The light-rail link between the two venue clusters hasn’t yet opened for visitors, so their ease of use isn’t clear.

Security will be a top concern in Sochi, too. The worlds showed Russian police working efficiently, though sometimes heavy-handedly.

Mark Takada of Calgary, Alberta, said he was taken aback one night when the competition was over and police swept through the “fan zone” adjacent to the stadium where spectators were listening to music.

“People were dancing, it was fun. Then the police came,” Takada said. “They shut it right down.”

Kevin Barnett of Newport Beach, Calif., was inclined to be forgiving of low-level irritations.