Police officers had to draw a Taser and used capsicum spray after being surrounded during two separate brawls involving teenagers at shopping centres in Sydney last night.

A total of 12 people were arrested in the brawls, which occurred at Miranda and Campbelltown.

Police were first told of a large number of people fighting at Kiora Road, Miranda, about 6pm.

Officers were questioning a 17-year-old boy over the fight when he became abusive and violent, police said.

As they arrested him, police said "a large hostile crowd formed around them".