Two men are in hospital with gunshot wounds and two police officers have been injured in separate violent incidents across Sydney overnight.

One police officer was injured when he was allegedly hit and pinned by a car, which he then fired a shot into — with a man later found several kilometres away with a gunshot wound.

And a chief inspector sustained a head injury when he was allegedly assaulted as police officers investigating a later shooting — in which a man was critically injured — were speaking to potential witnesses at the hospital.

Both officers were treated for their injuries while the other wounded men remain in hospital, with one in critical condition.

Police said the first incident occurred as Riot Squad officers were patrolling in Juno Pd in Riverwood, in Sydney’s southwest suburbs, about 8.30pm on Wednesday.

A 39-year-old officer approached a Toyota CHR stopped at an intersection before it then accelerated and pinned the officer between two vehicles.

The officer fired a shot at the Toyota as it drove away, police said.

Footage from the scene shows paramedics treating the officer for lower leg injuries as his colleagues searched for the Toyota, which is believed to have been stolen from Riverwood.

A 32-year-old man was later found with a gunshot wound on Squires St in Ryde, about 13km to the north. He was taken in a stable condition to hospital where he remains under police guard.

The Toyota was found nearby about 9.15pm.

In a separate incident a few hours later, police were notified of several shots being fired on Campbell Hill Rd in Chester Hill — about 9km west of the earlier incident — about 11.30pm.

Soon after, a 26-year-old man who had been shot multiple times was admitted to Auburn Hospital where he remains in a critical condition.

Two police officers have been injured in separate incidents across western Sydney on Wednesday night.Two police officers have been injured in separate incidents across western Sydney on Wednesday night. Credit: 7NEWS Two other men have been hospitalised for gunshot wounds while a third was arrested after allegedly assaulting a police officer.Two other men have been hospitalised for gunshot wounds while a third was arrested after allegedly assaulting a police officer. Credit: 7NEWS

Police believe the occupants of a black ute fired a number of shots towards the occupants of a Mercedes, which was later found in hospital carpark.

When officers tried to question a 30-year-old man at the hospital emergency department, he allegedly “repeatedly punched” a 58-year-old chief inspector in the head.

The 30-year-old was charged with assaulting a police officer and is expected to appear before Burwood Local Court on Thursday.

The chief inspector suffered a laceration to his head.

Anyone with information relating to either incident, including dashcam or CCTV footage, has been urged to contact Crime Stoppers.