ATHENS — Rioting broke out here and in Thessaloniki late Thursday, as masked youths at barricades pelted the police with homemade firebombs after rallies for the 10th anniversary of a fatal police shooting of a teenager.

The unrest in Athens flared in the neighborhood of Exarchia, a traditional stronghold for anarchists and where 15-year-old Alexis Grigoropoulos was shot dead in 2008, leading to the worst street riots Greece had seen in decades.

On Thursday, protesters lobbed firebombs and chunks of concrete hacked out of the sidewalks at riot police, who fired back tear gas and cast a choking, acrid haze, which hung over Exarchia into the early hours of Friday. A water cannon was used to douse fires in cars and dumpsters and on barricades and a building’s balcony.

A police official said that the authorities had detained 66 people and that two officers and a protester had suffered minor injuries. The official said that some of the protesters had built a burning barricade of car tires and refuse, and others had climbed onto rooftops, prompting the police to stay in the neighborhood even after the streets had calmed.