A MAN has been charged after WA's city detective headquarters were allegedly held up at knifepoint early today.

PerthNow understands a man entered the foyer of Curtin House in Beaufort Street at 2.50am then allegedly threatened a security guard with a 10cm blade, believed to be a fishing knife.

The man allegedly demanded cash and drugs from police before officers tried to negotiate with him. Police used a gun to keep the man at bay and later subdued him with a Taser stun gun.

A 26-year-old man has been charged with attempted armed robbery and stealing.

The attempted armed robbery comes after The Sunday Times revealed in August that WA Police had hired a private security firm for $1.7 million to protect the building and officers.

Accord Security was contracted by WA Police to provide security, foot patrols and CCTV monitoring at Curtin House for two years.

At the time, Assistant Commissioner Nick Anticich said police had beefed up security after a specific threat was made against the building.

Mr Anticich was determined also to ensure there was no repeat of the security lapse in which an 18-year-old impostor, dressed as a policeman, got inside the Beaufort St complex and other police facilities earlier this year.

He said dozens of tradespeople also had access to the building as it underwent refurbishment.