In a surprise about-turn, Fahim Ahmad, the ringleader of the so-called Toronto 18 has pleaded guilty.

The reversal of his plea was revealed Monday morning to jurors in what is a landmark trial — the first terrorism case in Canada to be decided by a jury.

Ahmad, described both as a “time bomb waiting to go off” and a “fantasist,” wanted to attack nuclear stations and storm Parliament, taking politicians hostage until they gave into his demands to pull troops from Afghanistan.

Ahmad’s guilty plea leaves co-accused, Steven Chand and Asad Ansari, as the final members of the alleged terror cell on trial.

“Ahmad’s guilty plea is not a factor to be taken into account,” Justice Fletcher Dawson told the five-woman, seven-man jury.

“You must understand that has no impact on the guilt or innocence of the two men who remain on trial.”

Ahmad was charged with contributing to a terrorist group for the purpose of carrying out an act of terror; importing firearms for a terrorist group, and instructing co-accused to carry out an activity for a terrorist group.

On June 2, 2006, Ahmad and his co-accused were arrested after a lengthy investigation by Canada’s spy agency and the RCMP, which included wiretapped intercepts, car probes and the infiltration of a police informant turned agent.

The Brampton court was told that in August 2005 Ahmad rented a car for two men, who were stopped at the U.S. border trying to re-enter Canada with three loaded semi-automatic guns.

In late November 2005, Ahmad met Mubin Shaikh, an agent assigned by CSIS to cozy up to him. Ahmad, described by Shaikh as a “time bomb waiting to go off,” spoke of his plans to train recruits to attack targets such as military bases and the Pickering power plant.

Ahmad also claimed to have had a weapons cache that included AK47s and M16s, which he had buried in a public park but which were then stolen.

He got the initial phase of his plan underway in late December 2005, when he organized a training camp in the woods near Washago, Ont. Attendees, as young as 15, listened to jihadi lectures and participated in military-style exercises and firearms training, led by Shaikh, who was then working for the RCMP.

A less nefarious picture surfaced when court was told some members had to sleep in a van because of sub-zero temperatures and squealed when a field mouse ran into a tent. And the portrait of a less capable ringleader also emerged when jurors were told Ahmad cut himself chopping wood and nearly set himself ablaze while adding fuel to a campfire.

But Ahmad’s intents would have been clear to most after he delivered an impassioned speech, exhorting attendees by saying, "We're here to kick it off. . . Victory is near . . . Our mission is great, whether we get arrested, tortured or killed. . . Rome has to be defeated."

Hoping to show off how serious they were to potential recruits, local imams and jihadi leaders overseas, they captured their exploits on camera.

Videos, later seized by police, contain Ahmad’s fiery speech and shows them training with a 9-mm handgun and playing paintball war games.

In early February 2006, Ahmad turned his attention to securing a safe house and court was told he drove with Chand, Shaikh and another man to Opasatika, near Kapuskasing. Ahmad said he also planned to use the house for storage of a mass shipment of weapons he claimed to have ordered.

During the trip, a car probe captures Ahmad asking, "Hey, wanna be part of the group that goes up to Parliament, man, cut off some heads?"

When asked what happens there, Ahmad replies, “We go and kill everybody.”

Ahmad also planned to take over the CBC building in Toronto to broadcast the group’s victory after attacking Parliament.

Shaikh agreed with defence counsel that by March 2006, it was evident that Ahmad was a “fantasist,” without the capability to carry out the attacks he spoke of.

After returning from Opasatika, court heard that Ahmad met with Zakaria Amara, whose voice is captured on an intercept saying he has built “the first radio frequency remote control detonator.”

But Ahmad is disappointed that it only works from a distance of about 30 feet and says “So you have to get blown up. . . Might as well sit in the car.”

The following month, Amara broke away from Ahmad, having lost confidence in his leadership, and formed his own group with members from Mississauga. But Ahmad pushed on with his own group, mostly from Scarborough.

Ahmad tried coming up with funds for an arsenal of weapons he claimed to have ordered. He considered asking the group’s members to max out their credit cards, but turned instead to a shady businessman involved in financial schemes.

But Ahmad was unable to recruit him with his talk of violent jihad, which was captured by a car probe: “They’re probably expecting what happened in London . . . Our thing is much, much greater on scale. . . You do it once and make sure they never recover again.”

Ahmad held a second camp to screen potential recruits at the Rockwood Conservation Area. Again he made a video, this time showing masked men, armed with knives.

Following his arrest, police found a 9-mm handgun at his residence that originated from the same Ohio gun shop as the weapons seized at the border in August 2005 and the bullets matched those found at the Washago camp site.