A 22-year-old man has entered Australian Federal Police headquarters armed with knives, while a Samurai sword sat in his car in the AFP basement.

The man was allegedly only arrested once he'd made it to the counter terrorism floor of the building after riding alongside a counter terrorism official in the elevator.

A Samurai sword was then allegedly found inside his car which was parked in the lot beneath the building at Goulburn Street in central Sydney,Seven News reported.

Scroll down for video

A 22-year-old man has entered Australian Federal Police headquarters armed with knives and was only arrested once he’d made it to the counter terrorism department. After his arrest, a Samurai sword was allegedly found inside his car

The man had reportedly driven into the basement and told guards he was there for an appointment.

An AFP spokesperson has confirmed the Tuesday security breach to Daily Mail Australia, but said there was not a 'specific threat to AFP employees or infrastructure'.

'An initial review of the incident indicates the breach of security protocols was caused by human error,' the spokesperson said.

'The safety and security of the community and AFP employees is always of the utmost priority.'

An investigation into the security breach is underway.

The 22-year-old man was charged with trespassing and other offences and appeared before Sydney Central Local Court on Wednesday.

The man had reportedly driven into the basement and told guards he was there for an appointment (car entrance pictured at left of building)

'An initial review of the incident indicates the breach of security protocols was caused by human error,' an AFP spokesperson said

The spokesperson declined to comment further as the matter is now before the court.

On Thursday, a 15-year-old boy was charged over a plot to carry out a terrorist attack at an AFP building in a separate incident.

The teenager, whose name cannot be published for legal reasons, was also convicted of possessing an illegal firearm just four months before he was arrested on Thursday morning after five homes were raided in Sydney's south-west, Sydney Morning Herald reported.

Just two months ago, police accountant Curtis Cheng, 58, was shot dead at the doorstep of police headquarters in Parramatta in Sydney's west.