The shooting took place in Föreningarnas hus, a community centre in the Sofielund neighbourhood in Malmö, shortly before 6am on Sunday.
Two men, aged around 20 and 25, suffered life-threatening injuries, while a teenage boy was mildly injured.
A big party was being held on the premises at the time of the incident, which according to local newspaper Sydsvenskan began with a fight between at least two people.
After the fight, an uninvited man entered the premises holding a gun in the air.
"He held up the weapon and shouted 'Who hit my brother?', then he started shooting ferociously in the room," a woman attending the party told Sydsvenskan.
Witnesses told Sydsvenskan people on the dance floor were hit by the shots. One person was reportedly hit in the chest, and according to a male witness the shooter fired five or six shots.
"I'm terrified, I don't get if this is a film or if it's actually happening," he told Sydsvenskan.
Police officers have been stationed outside the A&E at Malmö University Hospital as a routine precaution. No arrests have yet been made.