A western Sydney hospital's emergency department remains in lockdown after police shot a man who allegedly pulled a knife on staff.

Key points: The ABC has been told the hospital is in "complete lockdown"

The ABC has been told the hospital is in "complete lockdown" Streets were blocked off and specialist police officers were called in to assist the operation

Streets were blocked off and specialist police officers were called in to assist the operation The hospital, at the base of the Blue Mountains, is among Sydney's biggest and busiest

It is believed the patient walked into the emergency department and allegedly threatened a security guard with a knife before police shot him near the building's entrance.

The ABC understands that the man had a note that suggested an explosive device was in a car parked outside.

Police say the bomb squad is currently assessing the area while patients have been instructed to stay in their rooms.

The man is in a critical condition after being shot in the stomach and is currently undergoing surgery.

It is believed the man was not a patient at the hospital and that a number of police were already at the facility, attending to another matter.

Nepean Hospital general manager Brett Williams said patients who were moved out of wards are being returned to their original places.

He praised staff efforts under extreme circumstances.

"The staff performed tremendously, and so I really must thank them for all their hard work.

"It's not normal to have this sort of situation but we followed our usual protocols in relation to a disaster and performed tremendously."

NSW Ambulance said they received a call at about 4.00pm and dispatched five crews to the scene.

Nicole Fahey lives opposite the hospital and said her friends in the emergency department were "in shock".

Ambulances are being diverted to other hospitals and emergency patients are being asked to attend hospitals in either Blacktown, Liverpool, Hawkesbury or Mt Druitt.

Staff starting their shift need to enter via the north block entrance.