When in Rome, do as the good Roman tourists do and behave. If you act like a tyrant, a new law could ban you from parts of the Eternal City for up to 60 days.

Last month, Rome’s mayor signed legislation targeting disruptive conduct and harmful behaviors in the popular European destination, which received more than 9.5 million visitors last year. The order, which replaces a law from 1946, covers such infractions as late-night public drinking, bathing in fountains and defiling historical sites. It also grants local police greater authority to expel perpetrators from certain areas of the city. Repeat offenders could lose their visitation rights for an extended period of time.

“Bad behaviors are destroying the city and the old monuments in downtown,” said Sara Verde, chief executive operator and founder of Rome Tour Guide, which arranges tours of Rome and the Vatican with certified guides. “During the summer, people have baths in the most iconic fountains. The garbage attracts seagulls, and now Rome looks like a Hitchcock movie.”

The legislation covers several categories of comportment in various settings. For example, it is illegal to bathe your body parts — or your pet’s — in such waterworks as Trevi Fountain, the lion fountains in Piazza del Popolo, the Fountain of the Four Rivers in Piazza Navona and the Fontanone on Janiculum Hill. Also banned: tossing garbage and liquids into the water, and climbing or lounging on the structures. (Throwing a lucky coin into the fountain is still allowed.) People who engage in such unacceptable acts risk expulsion from the area for two days. The no-bathing and littering rule also applies to the fountains, called nasoni, that burble throughout the city. Sipping from the public water fountains is permissible; using them like a personal bidet for your sweaty feet is not.

To crack down on drunkenness, the law will restrict consumption of alcohol in public spaces year-round; previously, the rule covered only the peak summer months. Organized pub crawls are no longer permitted, nor is drinking alcohol in such open-air venues as gardens, parks and fountain squares from 11 p.m. to 7 a.m. To remove the temptation, liquor retailers, including vending machines and roadside stands, are not allowed to sell takeaway beverages from 10 p.m. to 7 a.m. Restaurants, bars and other watering holes must turn off the spigot from 2 to 7 a.m. In addition, from 10 p.m. to 7 a.m., you can’t drink any type of beverage in a glass bottle, not even fruit-flavored San Pellegrino.

When asked about problems instigated by tourists, Davide Bolognesi, marketing manager of Roma Experience, a local tour operator, immediately brought up vandalism.

“The first thing that pops in our mind is the misplaced eagerness of some travelers to escape oblivion by carving their name on the walls of the Colosseum,” he said. “One of the greatest challenges in Rome is to protect, restore and maintain an immensely vast treasure of monuments and art works visited by millions of people every year.”

To safeguard its priceless artifacts, the city will not tolerate vandals who deface or disfigure the monuments or architectural features in the historic center, a UNESCO World Heritage site since 1980. In addition to facing criminal charges, the hoodlums must restore the property to its earlier condition.

The law also addresses individuals or groups who block the pedestrian flow around such sensitive areas as museums, parks, universities and hospitals — for example, engaging in an unruly game of soccer in Piazza del Campidoglio. The punishment: eviction from the premises. Other no-nos include tossing cigarette butts on public property and in water sources, and adhering leaflets or stickers to light poles, road signs or other fixtures.

The rule on Roman gladiators does not apply directly to tourists, but here’s a tip: If a man in a knee-baring tunic and a body shield approaches you for a photo, walk away. The law contains a cease-and-desist order for the costumed panhandlers called “centurions” as well as to “saltafila” (folks who help you jump the line at attractions or sell unauthorized tickets) and unlicensed food and beverage vendors.

“Strict rules preventing the destruction or havoc of this incredibly unique city are welcome,” Bolognesi said. “But I would rather see new strategies, a new vision, another and braver approach to the challenges of Rome.”

More from Travel: