Two people have been arrested after allegedly trying to run over a police officer north of Melbourne.

Police say a car with stolen plates rammed a police vehicle on Plenty Road in Whittlesea, then crashed into a fence shortly before 9am. 

A male police officer approached the car to arrest the two people inside it, before the driver tried to run him over, police said. 

Police vehicles and officers outside a brick school building.

Police say one of the people arrested after the incident in Whittlesea was taken to hospital for observation. (Supplied: Kathryn Stefanou)

The police officer fired a shot at the vehicle, causing the occupants to flee on foot.

Officers then arrested a woman at the scene.

A man ran a short distance from the scene but was restrained by members of the public until police arrested him.

The male occupant was taken to hospital for observation, police said.

The police officer was not injured in the incident.

Nearby, Whittlesea Primary School went into lockdown as a precaution. 

A resident told the ABC she was in her car sitting in traffic when she heard people screaming “gun, gun”.

“I parked in the KFC and witnessed the crossing lady manage the whole thing with authority,” Kathryn Stefanou said.

“As it was all happening, the guards, teachers and parents got the kids inside with speed.

“The crossing lady then managed the traffic for the whole duration.”

The Victorian education department said the primary school enacted its safety procedures and that no staff or students were injured.