It was September 2007, six years into the “war on terror”, and two seasons into The War on Everything. John Howard was prime minister, George W Bush was in town, and, in a fake motorcade with Canadian flags, Chas Licciardello was slowly rolling down Sydney’s Macquarie Street dressed as Osama bin Laden.

Formed in 1999 as a satirical Onion-style newspaper, The Chaser (often erroneously called The Chasers) made their TV debut in 2001 on the ABC with The Election Chaser, followed by 2002’s CNNNN (a spoof of cable news) and 2004’s The Chaser Decides.

By 2007 the comedy group had honed a formula of sharp political satire mixed with on-camera stunts, from giving John Howard the anniversary present of a heart to crashing the Labor party’s national conference as the ghost of Mark Latham. Paired with Spicks and Specks, Wednesday nights on Aunty become a somewhat surprising ratings juggernaut.

The peak came that September in Sydney, as the world’s most important leaders gathered for Apec – an economic meeting of Pacific rim states. The New South Wales government had passed a suite of emergency laws and spent $170m on security.

In an atmosphere of increasingly draconian national security laws, The Chaser had fake security passes that said “JOKE”. They had a crew of nine. And, in the backseat, in flowing white robes, they had Licciardello dressed as the most wanted terrorist on earth.

The full episode containing The Chaser’s Apec stunt.

‘Snipers were very much part of the objective’

Sophia Zachariou (executive producer): The concept of the show was that everything was fair game.

Tony Loughran (high-risk safety adviser to the ABC): The original idea was to sail down Sydney Harbour in a battered flotilla and let a pyrotechnic off, because the Apec leaders were going to be at the Opera House for a group photograph. I knew the counterterrorist team were training for an amphibious assault so I said: “I wouldn’t do that if I were you.” That upset them a bit, so I said: “Why don’t you do a JFK-style motorcade and run alongside the car?”

Julian Morrow (The Chaser/executive producer): Tony’s an ex-British commando and he got right into it. He gave us really good advice, like the drivers should keep both hands on the wheels at all times, never go for cigarettes. The drivers just turned up with the hire cars on the day and all of a sudden they’re in this intense situation.

Giles Hardie (extra): I got a call from [producer/director] Nathan Earl, saying, “You look convincing in a suit. Are you free tomorrow?” The ABC costume department provided the suit, right down to the sunglasses and the secret service pins, which were, from memory, Sydney Rugby League Club pins. We had earpieces, not that they were attached to anything. Judging by the flags on the cars we were part of a Canadian convoy.

Giles Hardie: ‘We got through the first gate because no one was looking.’ Photograph: ABC

Sophia Zachariou: We’d done recces and had maps and detailed analysis sheets. The advice from the ABC legal department was we could play around the green zone but do not enter the red zone at any cost. We were told to redesign the laminates so that they looked fake, so we wrote on them “This is a joke”.

Julian Morrow: I describe it as a stunt that went horribly right because it was designed to fail, in the sense that Chas was going to be the comic relief, to be deployed when we got stopped.

Giles Hardie: Tony and Julian had outlined everything, right up to the supposed shoot-to-kill order. Snipers were very much part of the objective. They talked to us about how to deal with that situation; it was very reassuring.

Tony Loughran: [Cagily] We knew in some respects where some of the sniper positions were.

Julian Morrow: I once met a guy in a pub who introduced himself as somebody who’d had me in the crosshairs of his rifle.

‘All hell broke loose’

Julian Morrow: ‘I describe it as a stunt that went horribly right.’ Photograph: ABC

Giles Hardie: We got through the first gate because no one was looking. When we read the police reports later we discovered they’d been instructed to not look into the cars because visiting dignitaries don’t like to be stared at. It ended up in a funny situation where I was staring stonily at a police officer who was outside the barrier, staring in. I was confident she was going to say: “You’re not a security guard, you’re an idiot.” But all I could hear in the back of my mind was “Do not break character”, so I just stared and eventually she turned away.

Julian Morrow: I remember looking down the empty street to the Opera House and thinking we could clearly go all the way into the red zone. When we got as far as the InterContinental hotel I thought, we need to flip the switch now to the comedy part of it. Let’s get Chas to get out and walk. And then all hell broke loose and the police swarmed me.

Sophia Zachariou: Julian, at that point, didn’t even know they were in the red zone.

Julian Morrow: My cousin was the camera operator in the limo with Chas. In the legal proceedings, me and Chas were the main defendants and the others were crew, whose defence was that they were just following orders and hadn’t wanted to take part in any illegal stuff. The only problem was the audio on the camera in my tie had accidentally been left on, so you could hear my cousin giving a director’s commentary, like: “This is superb, we’re going right through, the fucking idiots!”

‘There was a ceremonial moment when Nathan stuck his hand down his pants’

Giles Hardie: The two motorcycle outriders had flown back up the corridor and were never identified. But we got halfway back up and a police officer came over and said: “What are you doing?”

Sophia Zachariou: They were detained in a police van and this burly detective told me they were taking them down to Goulburn Street. Chas and Julian could look after themselves, but all the others were a worry for me – that duty of care. I beat his chest, saying: “What do you mean? What are you arresting them for?” I had my map and I said: “They’re not even in the red zone!” He said: “They’re in the red zone.”

Photograph: ABC

Julian Morrow: We were charged with entering a restricted zone. Our cameras were confiscated and there was a moment in the cell when I said to Nathan: “We’ve lost that footage.” Nathan gave me a furtive look and indicated that there was a small tape secreted in the area behind his scrotum. He kept that there for 10 hours.

Sophia Zachariou: And then there was just a media pack. Craig Reucassel was not arrested, so he was doing all the interviews. I met him beforehand and said: “No jokes, play straight bat.”

Julian Morrow: The two guys who arrested us took me and Chas into the bowels of the building, into a windowless room with a locked door. I was a bit worried but then they asked if they could get a photo. There is, somewhere out there, a photo of me and Chas with our fake Apec passes, with the two arresting officers with their real Apec passes, all holding them up.

Sophia Zachariou: After we bailed them, we concocted a ruse to sneak them out. It was about 10 at night. [ABC publicist] Peter Ritchie and I were outside talking loudly on our phones saying: “Yeah, they’ve gone, might as well go home,” so the press dispersed.

Julian Morrow: We went back to the office and there was a ceremonial moment when Nathan stuck his hand down his pants, produced this tape and threw it up in the air. We were even happier 24 hours later when the police gave us all our footage back.

Julian Morrow: ‘Osama bin Laden, the most wanted man in the world, was walking next to me without any police – for about four seconds.’ Photograph: ABC

‘Bush Sr’s VIP detail … thought it was bloody hilarious’

Sophia Zachariou: All the news outlets were trying to get hold of the footage; we even had ABC journalists try and push their way into our office. We were checking public opinion on social media but it seemed to be on our side, so we went full throttle. It aired the following week to over 2 million viewers.

Julian Morrow: We’d been thinking the stunt wasn’t that funny till we looked at the footage and noticed something that gave us our punchline. All the police frogmarched me, which meant that Osama bin Laden, the most wanted man in the world, was walking next to me without any police – for about four seconds. It was one of those pieces where we made the comedy back in the edit suite.

Tony Loughran: I sent a link around to some of the security guys I’ve worked with around the world, including Bush Sr’s VIP detail, and they thought it was bloody hilarious.

Julian Morrow and Chas Licciardello, safe back on The Chaser’s on-set couch. Photograph: ABC

Julian Morrow: I used to say that if half the nation was against us then that was a really good day because we were unusually popular. But Apec was different. The mood in Sydney was that it had been security overkill, so outside of the diplomatic and security services it seemed everyone was onside, even the Daily Telegraph.

Sophia Zachariou: For three months, the NSW police turned up at the ABC every week with a search warrant for something. I was constantly being called down to reception. After seven months, the charges were dropped.

Julian Morrow: The trial would have been hilarious. It would have included a statement from one officer that he did recognise me as somebody from The Chaser, but he didn’t intervene because the motorcade was travelling really fast and it would have been a breach of occupational health and safety. But Nick Cowdery [former NSW director of public prosecutions] dismissed the charges on the basis that there was no reasonable prospect of conviction.

Sophia Zachariou: I’ve still got my “Free the Chaser 11” T-shirt somewhere.

• This article was corrected on 20 January to correct the reference to a camera in one of the performer’s pants; it was a tape