A 34-year-old man and a 24-year-old woman were later detained after surrendering to police.
The incident occurred after a short car chase in the Grünerløkka area of the city at around 2am on Wednesday morning, according to a report in the Aftenposten daily.
"At 2.03am a canine unit began pursuing a Swedish-registered car that would not stop for inspection. The underlying reason for the check was the behaviour of the driver," said Finn Belle at Oslo police to the NTB news agency.
The car chase continued to the Thorvald Meyer street, where the police unit was threatened with a firearm held by one of the people in the car. The car later stopped in the Øvrefoss area when the gunman climbed out of the car and took aim at the police unit.
The police then opened fire, letting off two shots through the windscreen of their patrol car. According to Aftenposten the shots hit the driver-side window of the other vehicle.
The two suspects, a 34-year-old man and a 24-year-old woman, then elected to give themselves up to the police and were formally arrested.
Story continues below…
The couple, while travelling in a Swedish-registered car, are both reported to be Norwegian and are previously known to police. The pair were taken to Grønland police station and will be interrogated on Wednesday. The police have not yet confirmed whether the vehicle, a Volvo, has been reported stolen.
Police confirmed that they located the weapon and various other items in the vehicle at the time of the arrests.