SAN FRANCISCO — San Francisco supervisors on Tuesday approved a prohibition on performances using wild animals, joining dozens of other places that frown upon the display of bears and big cats, elephants and monkeys for human entertainment.

The ban applies to circuses, backyard birthday parties and filming of movies and television shows. Cats, dogs and other domesticated pets are exempt, as are animals used for educational purposes.

The ordinance, which heads to Mayor Ed Lee for consideration, prohibits a number of exotic animals from being required to do tricks, spar or otherwise perform for an audience.

Advocates and opponents agree that San Francisco will be the largest city in the U.S. to enact such a comprehensive prohibition that goes beyond a traveling circus, for example, and applies to filming.

The nonprofit group Performing Animal Welfare Society, or PAWS, said there are about three dozen cities or counties that prohibit the display of performing wild animals.

Tuesday’s vote by the San Francisco Board of Supervisors was a formality and came without comment.

“The thing to note about the legislation is that it’s trying to protect against abuse of animals,” said San Francisco Supervisor Katy Tang, lead sponsor of the ordinance and an avid animal lover who gave up eating meat years ago.

“A parrot on a shoulder, generally speaking, they are not abusing them to make them talk,” Tang said. “As long as there’s no abuse involved, folks should not worry.”

Tang said it’s not natural for a bear to balance on a ball. And most likely, she added, that bear has been denied food, scared and tormented to train it to balance on a ball.