Jake Gibb, 31, climbed over a wall into Holyrood’s private grounds on January 14 before entering the building’s basement through an unlocked hatch.
A court heard he then walked unchallenged through sensitive areas, including maintenance rooms containing access to the ventilation systems, before breaking into corridors close to the main debating chamber.
Gibb even entered the tower containing ministers’ offices before being detained by security staff.
Gibb took more than 100 pictures of the building’s interior on his mobile phone, a court heard, and used the intercom system to taunt security guards before being cornered in the MSPs’ garden and handed over to police.
His arrest was followed by a massive security operation that included a search of the complex for explosives or biological weapons and a review of areas not covered by CCTV.
The “terror alert” represented a major embarrassment for Parliament chiefs, who have spent millions installing high-tech scanners and anti-terrorism devices.
It also proved an embarrassment for Gibb’s sister Vicky, who was detained under anti-terrorism laws after she got a taxi to Holyrood in a panicked bid to rescue him.
Gibb, who is believed to be the first intruder in Holyrood’s 20-year history, pled guilty on Friday to criminal charges relating to the break-in.
The labourer and single father from the capital’s Broomhouse area, pleaded guilty at Edinburgh Sheriff Court to committing a breach of the peace by entering the Parliament building without permission and vandalising fixtures and fittings there.
After his court appearance, Gibb said: “It’s just as well I’m not a terrorist. Getting into the building was just too easy.”
While apologising for his actions, Gibb also blamed the authorities for failing to install proper security.
He said: “I’m really for Scottish independence, but I feel they [Parliament security] are simply inept.”
The court heard Gibb was high on a cocktail of alcohol and illegal tranquillisers on Thursday January 14.
Miriam Clark, prosecuting, said he had simply “slipped over the wall” next to the passholders’ entrance in Canongate without tripping motion sensors.
He then tried to escape via gardens outside the MSPs’ offices, but found himself trapped in a dead end, at which point he was captured by security guards and held until the police arrived.
When officers arrested him, Gibb told them: “I’m not a terrorist. I’m curious. I just came for a look around. I just wanted to see what Nicola was up to.”
When asked how he had got into the building, he told cops: “That’s for you to find out.”
His solicitor Nigel Beaumont described the incident as “highly opportunistic”.
Mr Beaumont said: “‘This was more a stupid form of daring behaviour to see if he could get in. He apologises to the court for this stupidity. He was taking pictures of himself to prove to friends and family that he was in there.”
Gibb pled guilty to breach of the peace and causing malicious damage and had sentence deferred for reports. He is due to be sentenced next month.