A Swindon man has been charged with possession of a firearm with intent to resist arrest after a police officer was shot at with a BB gun.
Ricky Alan Anthony Bird, 22, of St Philips Road, was also charged with battery.
Officers went to a house in William Street, Swindon, at about 0245 GMT on Sunday following reports of a disturbance.
Police said a BB gun was fired several times. The officer was unhurt.