A young woman was rushed to hospital and up to 20 others affected when a gas was sprayed over a pub dance floor.

The personal defence spray was deployed after two men approached a woman at the Perseverance hotel in Fitzroy, Melbourne, about 1am on Sunday and hassled her.

Senior Sergeant Steve Mills said the chain of events and what the spray contained was still unclear as neither the woman nor the two men had come forward.

A young woman was rushed to hospital and up to 20 others affected when a gas was sprayed over a pub dance floor

'I'm assuming the girl who did it felt genuinely scared. It's important to note that those sorts of things are illegal, although I sympathise with her for using it,' he told ABC.

Sergeant Mills added that the gas likely got into the pub's air-conditioning an affected more patrons than the girl intended.

He said capsicum spray and similar were illegal in gas form and now usually sold as a foam to prevent incidents like this.

The personal defence spray was deployed after two men approached a woman (not pictured) about 1am on Sunday and hassled her

Partygoers were seen being attended to by multiple ambulances on the street outside the pub in Melbourne's trendy inner-northeast suburbs

The incident happened at the same time as an alleged assault for which a 27-year-old man was arrested at the pub, but it's not clear if they were connected.

Partygoers were seen being attended to by multiple ambulances on the street outside the pub in Melbourne's trendy inner-northeast suburbs.

A young woman was taken to St Vincent's Hospital in a stable condition after she had difficulty breathing.