Australian police said Tuesday they thwarted a terrorist plot in which extremists with ties to an Al-Qaeda-linked Somali Muslim group planned to invade a military base and open fire with automatic weapons until they were shot dead themselves. The four were seized in dawn raids on 19 properties across Melbourne following a seven-month investigation involving several forces and Australia's national security agency ASIO. Prime Minister Kevin Rudd said the arrests showed “the threat of terrorism is alive and well”. But officials said Australia's terrorism warning alert would remain at medium level, where it has been since 2003. The four detained men were aged between 22 and 26 and were all Australian citizens with Somali and Lebanese backgrounds. Police said they were linked to Somalia's Al-Shabaab group. The suspects had planned to storm a military base in suburban Sydney with automatic weapons, Acting Australian Police Commissioner Tony Negus said. “The men's intention was to actually go into the army barracks and to kill as many soldiers as they could until they themselves were killed,” he said. Police said they had worked with international agencies on the raids. One man, Nayaf El Sayed, 25, was charged with conspiring to plan or prepare a terrorist act. He did not enter a plea or apply for bail, and he refused to stand for the magistrate before he was remanded in jail to reappear in court on Oct. 26. Police were granted extra time to question three others: Saney Aweys, Yacqub Khayre and Abdirahman Ahmed. A fifth man, in custody on other matters, was also being questioned and police have not ruled out more arrests.