President Barack Obama played the straight man Tuesday night on “The Tonight Show with Jay Leno,” using the platform show to outline his expectations for the 2014 Winter Olympics in light of Russia’s new anti-gay law.

Saying that he had “no patience for countries that try to treat gays or lesbians or transgender persons in ways that intimidate them or are harmful to them,” Obama criticized a law, enacted in June, that prohibits public events promoting gay rights and public displays of affection by same-sex couples. A Russian official has promised that the law will be enforced during next February’s Sochi Games despite the International Olympic Committee’s contrary stance.

“One of the things I think is very important for me to speak out on is making sure that people are treated fairly and justly because that’s what we stand for, and I believe that that’s a precept that’s not unique to America,” Obama said. “That’s just something that should apply everywhere.”

Politics often intrudes on the Olympics, but open intolerance at a time when the whole world is watching would leave a staggeringly negative impression.

“I think Putin and Russia have a big stake in making sure the Olympics work,” Obama told Leno, whose network broadcasts the Games, “and I think they understand that for most of the countries that participate in the Olympics, we wouldn’t tolerate gays and lesbians being treated differently.

“And if Russia wants to uphold the Olympic spirit, then every judgment should be made on the track, or in the swimming pool, or on the balance beam, and people’s sexual orientation shouldn’t have anything to do with it.”

Follow @CindyBoren on Twitter and on Facebook.