Objects were thrown at police when they arrived to arrest a gang following an alleged theft from a shop.
Police were called to a shop on Lower York Street, Wakefield, at around 12.30am on Tuesday following reports of an alleged theft and threats made to staff.
They then went to an address on Arundel Close and a gang of men and women threw objects at them from a second floor window after locking themselves in the property.
The officers forced their way into the property and arrested two men, aged 22 and 23, an 18-year-old woman and a 16-year-old girl on suspicion of affray.
A police spokesman said no-one was injured in the incident and all four people remain in custody.