When police arrived at the school, the man allegedly fled from officers, heading further into school grounds.
Police officers were then deployed into the school to prevent the man making his way into any classrooms or areas where pupils and teachers were present.
When located by officers, the man then allegedly presented the imitation pistol and was shot once, police said.
Medical assistance was immediately provided by the officers present and the man was transported by Hawke's Bay Hospital. He was in a stable condition on Wednesday morning.
A scene examination was completed at the school last night with a number of enquiries under way, including interviews of witnesses who were at the school at the time of the incident.
Police say that there may also be members of the public who witnessed yesterday's events and have not yet spoken to the authorities and ask that they get in touch with via 105.
MORE SOON