"He had a knife in each hand. We tried verbally to get him to stop, to give up, to drop the knives," officer Kenneth Sundin told the Upsala Nya Tidning (UNT).
"Pepper spray didn't help, and shooting him in the leg had no effect."
Police officers then shot the man dead.
Uppsala police said the man had been on their radar twice on Monday, once in the morning after he threatened another man, and again in the evening when he assaulted his ex-wife.
He was arrested at 9.30pm and released in the early hours of Tuesday morning, and shot dead 90 minutes later.
Witnesses heard seven or eight shots, reported UNT. The police admitted to firing warning shots, but kept tight-lipped about how many times they shot at the man.
Swedish police have the right to shoot those suspected of serious crimes, or to contain a person who is putting others in danger.
Shots can only be fired following a warning shot, when possible, added the TT news agency. Officers who are deemed to have used their weapon outside of these guidelines can be convicted of crimes, in extreme cases even manslaughter.
The shooting marks the sixth time police have shot someone dead in the last year. Previously, police only shot suspects dead around once every two years.
Criminologist Jerzy Sarnecki said the incidents are becoming a trend.
Story continues below…
"It's terribly difficult to imagine that it's a coincidence. These shootings follow a pattern, a person is mentally unstable, possibly drunk, and go at the officers with a knife and then get shot," he told the TT news agency.
"Each one of the shootings can be understood to be more or less justified, as the police are in danger. But hasn't this ever happened before? I don't believe for a second that the number of knife-wielding crazy people has increased."
He added that the police were almost certainly to blame, and that it was their job to protect people rather than kill them.