A police officer was punched in the head and the riot squad called after a party on council property got out of hand in south-western Sydney.

Police responded to calls just before 11pm on Friday to find a gathering of as many as 400 people in the Cecil Hills Community Centre on Sandringham Drive, which is owned and operated by Liverpool Council as a venue for hire.

The party's attendance peaked at around 400, four times the maximum capacity allowed by the council. Credit:Facebook

One 17-year-old was arrested after allegedly assaulting a police officer as well as a 16-year-old for failing to comply with a move-along notice by police.

Both were taken to Green Valley Police Station, where they were later released to their parents.