Six officers sustained injuries when they came under attack as they tried to break up an illegal rave in the countryside close to Highclere Castle, the main filming location of Downton Abbey.
Officers allegedly had missiles thrown at them when they tried to stop the event attended by up to 100 people in Beacon Hill, Highclere, on the Hampshire/Berkshire border, police said.
The injuries are described as not serious.
A 29-year-old woman and a 23-year-old man were arrested on suspicion of organising the unlicensed event. The woman, from Oxfordshire, was also held for suspected possession of class B drugs.
Officers from Hampshire and neighbouring Thames Valley Police received calls about the party at around midnight on Sunday morning. The forces said they attended to prevent any disorder and disruption to local residents.
A Hampshire Constabulary spokesman said: “Officers were subjected to violence, including missiles thrown at them, which resulted in six officers sustaining non-serious injuries.
“It is believed between about 80 and 100 people attended the illegal event.
"We will continue to take every measure possible to prevent any such illegal music events from happening within the two counties of Hampshire and the Isle of Wight in the future.”
The police action was met with a mixed public response after officers detailed the operation through a post on Hampshire Police’s Facebook page.
Cliff Emmans wrote: “I know Beacon Hill area well and there is no houses anywhere near there apart from Highclere Castle (where Downton Abbey is filmed)...”
Hemmy Jay wrote: “Thats harsh not hurting a soul.”
Nancy Carter-Bradley meanwhile said: "I live in Highclere and I for one am really happy that the police are out doing a great job looking after our little world..... Real eye opener some of the ignorant comments on here.”
In September, police said the number of illegal raves held in Hampshire and the Isle of Wight had fallen significantly following a crackdown.
Operation Enigma was launched by the Hampshire force in May after unlicensed music events were seen to be on the rise.
Police said they were alerted to 22 illegal raves in Hampshire and the Isle of Wight last year, but, as of September this year, only 12 had been reported.