BEIJING — Courts in the western Chinese city of Xi'an sentenced 12 people Friday to up to 10 years in prison for attacks on Japanese-brand vehicles and a driver during a wave of anti-Japanese violence in September.

The attacks came amid public anger over the Japanese government's purchase of a tiny uninhabited East China Sea island group north of Taiwan that China claims as its territory. Angry demonstrations broke out in a number of Chinese cities, although those in Xi'an were by far the most violent, with Japanese department stores and restaurants in the downtown area smashed, looted and burned.

In the most serious case, Cai Yang was sentenced to 10 years and fined $42,000 for bashing the driver of a Toyota Corolla on the head repeatedly with a bicycle lock when he attempted to prevent Cai from smashing the vehicle. The driver was hospitalized with severe injuries and his vehicle badly damaged, while Cai went into hiding.

Others were sentenced by three separate district courts to less than two years for scuffling with riot police and smashing Japanese-brand cars, almost all of which were made in China by Chinese working for government-owned joint venture enterprises.

Ten months after the violence, China-Japan relations remain in a deep freeze and tensions over the islands are high. Although no clashes have been reported, Chinese and Japanese patrol vessels regularly confront each other in waters surrounding the archipelago, known as Diaoyu in China and Senkaku in Japan.