The lone surviving gunman in the November Mumbai attacks admitted his role in the shooting rampage in a dramatic confession Monday in an Indian court, reversing months of denials. Pakistani Ajmal Kasab, on trial since April 17 in a special court, stood up just as a prosecution witness was to take the stand and addressed the judge. "Sir, I plead guilty to my crime," he said, triggering a collective gasp in the courtroom. Judge M.L. Tahiliyani, who also was apparently taken aback, called lawyers from both sides to figure out the significance of Kasab's statement. A total of 166 people, including six Israeli and Jewish occupants of the local Chabad House, were killed in the attacks by 10 gunmen in Mumbai, India's financial capital, that began Nov. 26 It ended three days later with troops storming the Taj Mahal Hotel where some gunmen were holed up. Officials in the Prime Minister's Office Counter- Terrorism Bureau said shortly after the attack it appeared that the Chabad House had been specifically targeted by the terrorists, who in addition to attacking luxury hotels also wanted to send a message to Israel. It was not immediately clear what prompted Kasab, 21, to make the statement after consistently denying he was guilty. "Everybody in the court was shocked the moment he said he accepts his crime. It was unexpected," public prosecutor Ujjwal Nikam said. "We have finally extracted the truth." Harish Salve, a senior Supreme Court lawyer, said it was not clear if Kasab confessed voluntarily. "I am sorry to play the party spoiler. But I hope he doesn't come the day after and give it another twist," he said. Majid Memon, another lawyer, said the only question that needs to be answered now is "whether this admission today ... in this important trial is voluntary or involuntary." If the confession holds up in court it will be a big boost to India's claims that terrorist groups in Pakistan were behind the attack, and that Islamabad was not doing enough to clamp down on them. The allegations have severely strained relations between the two nuclear-armed archrivals. Pakistan has acknowledged the Mumbai attacks were partly plotted on its soil. In his lengthy statement, Kasab gave details of his group's journey from Karachi, Pakistan on a boat, their subsequent landing in Mumbai, and the bloody rampage that followed as the gunmen, armed with automatic rifles and grenades, killed people at a railway station, a Jewish center, a hospital and two five-star hotels, including the Taj Mahal. Kasab was arrested after a shootout with police on the first day of the attacks. He was treated for wounds and has since been held in solitary confinement in Mumbai's Arthur Road Jail. Monday's development came days after Pakistan gave a dossier to India with details of its investigation into the terrorist groups that New Delhi claims were responsible. Pakistan Foreign Ministry spokesman Abdul Basit declined to comment on Kasab's court admission. Late last month the special court also issued arrest warrants for 22 Pakistani nationals accused of masterminding the attacks. India blames Pakistan-based Islamist militant group Lashkar-e-Taiba. The founder of the group, Hafiz Mohammed Saeed, was arrested with two other senior figures by Pakistani authorities in December. A court in the eastern Pakistani city of Lahore freed Saeed, a hard-line Islamic cleric, in June saying there was no evidence against him. The federal government will appeal the verdict. In his statement Monday, Kasab named Saeed as a conspirator. Anand Chavan, the chief minister of Maharashtra state of which Mumbai is the capital, congratulated the prosecution team and said "the court should give the maximum punishment" to Kasab. Yaakov Katz contributed to this report.