The carefully planned Riyadh attacks had all the hallmarks of a Qaeda operation. After months of relative silence, the terrorist network seemed to be sending a gruesome message to the United States, and the world: though stripped of many top leaders, the organization was anything but dead. As if to quell any remaining doubts about the network’s

potency, on Friday night the terrorists struck again, this time in crowded Casa-blanca. Suicide bombers attacked five sites, including a Jewish community center, a Spanish club, a large hotel and the Belgian Consulate, killing more than 40 people.

The bombings immediately called to mind the swaggering assertions of U.S. officials, including President George W. Bush, about the terror network’s decline. “Al Qaeda is on the run,” Bush said on May 5. “Right now, about half of all the top Al Qaeda operatives are either jailed or dead. In either case, they’re not a problem anymore.” Privately, some U.S. and European intelligence agencies cringed at the remarks. They agreed that the capture of terrorist leaders, along with stronger security and better fact-gathering, had made it much more difficult to stage another complex, large-scale attack inside the United States or Europe. But they continued to warn that the terrorist group, known for its patience, might simply be rethinking its methods and waiting for the best time and place to strike next.

In the months before last week’s attacks, there were indications that the group seemed to be shifting its focus away from the West, and was instead seeking out “targets of opportunity” in countries where security would be weak. U.S. intelligence agencies noticed a marked increase in communications “traffic” between suspected terrorists, indicating that a Qaeda strike in Saudi Arabia, East Africa or Southeast Asia was likely imminent. In hindsight, the information was eerily accurate. One U.S. intelligence memo, obtained by NEWSWEEK, warned that Al Qaeda might launch a “multi-pronged attack against the same target,” allowing the terrorists to overcome “high security installations.” The memo concluded, “We must remember the group is highly dynamic and capable of developing novel methods of execution that may result in almost complete surprise.” Frustrated U.S. officials lament that even though they have vastly improved their ability to track the terrorists, and even predict where they might strike, time and time again it has turned out to be too little, too late.

In the weeks before the Riyadh bombings, U.S. officials virtually pleaded with the Saudis to take the threats seriously and toughen up security. But the requests were all but ignored. As the intelligence warnings became more dire in early May, the White House tried to drive the point home. Deputy national-security adviser Stephen Hadley, at the time traveling to Russia and Israel, was secretly diverted to Riyadh to meet with Saudi leaders. Yet the man in charge of Saudi security, Interior Minister Prince Nayef bin Abdul Aziz, did little to intervene. It wasn’t the first time the aloof, 71-year-old prince had resisted U.S. efforts. After the September 11 attacks, Nayef refused to admit that Al Qaeda was operating inside his country; last December, Nayef told an Arabic newspaper that he believed “Jews” were responsible for the 9-11 plot.

Even without U.S. warnings, the Saudis had every reason to believe trouble was coming. Earlier this month a three-man undercover team from Nayef’s own security police staked out a suspected Qaeda safe house just outside Riyadh. When one of the terrorists spotted the officers, a gun battle broke out, and the suspects got away. Inside the house, the police found an alarming arms cache–55 hand grenades, 2,545 bullets and 829 pounds of explosives. The building was just 400 meters from a compound that housed Americans and other Westerners. When U.S. Ambassador Robert Jordan urged top Saudi officials to station armored cars and guards with machine guns at the gates, they said they would take it “under advisement,” says one U.S. source. Nayef did nothing. The compound was one of the three bombed the following week.

The Saudis, at last, are listening. The country’s leader, Crown Prince Abdullah, was so furious after the attacks that he made a rare televised statement warning that the terrorists would “have a destiny that is very harsh in hellfire.” Last week Saudi officials also confirmed that they had shut down at least eight offices of the Haramain Foundation, a government-backed Islamic charity. NEWSWEEK has learned that top U.S. counterterrorism officials had presented the Saudi government with intelligence last month showing how the group allegedly funneled money to Al Qaeda. Acting against Al Haramain was difficult; in Saudi Arabia, such charities are considered sacrosanct, in part because of the Islamic duty to give money to the needy.

In the aftermath of the Riyadh and –Casablanca attacks, U.S. intelligence officials are now trying to figure out how Al Qaeda may have begun to change the way it operates. Some officials say that the recent bombings show that the network is recruiting new members, replenishing the ranks from below. Others believe that the group may be simply using Qaeda “sleepers,” bin Laden loyalists who went through Afghan training camps, then returned home to await further instructions. Last week the Saudis released a list of the 19 suspects who escaped after the earlier botched police stakeout, and then likely carried out the bombings. It included young, new militants, and also more-experienced operatives like Khaled Jehani, a graduate of the Afghan camps. One American official told NEWSWEEK that U.S. intelligence picked up some evidence that there was “communication up the chain” from the Riyadh plotters to Qaeda leaders outside Saudi Arabia.

The most pressing question for investigators: where will Al Qaeda strike next? Officials say they are closely watching Malaysia and several countries in eastern Africa, including Ethiopia and Kenya. Last week the British government canceled all flights to and from Kenya after intelligence reports indicated that a terrorist known as Haroun–who played a key part in the 1998 bombings of U.S. embassies in Kenya and Tanzania–was on the loose in Nairobi, possibly armed with shoulder-mounted missiles. The United States is also hunting two Yemeni men, Fahd al-Quso and Jamal Ahmed Mohammed Ali al-Badawi, charged last week with helping to carry out the 2000 bombing of the USS Cole.

But what worries American intelligence officials most is the possibility that Al Qaeda is once again plotting attacks in the United States, perhaps using information they gathered before September 11. The FBI suspects that in March 2001, Qaeda scouts were sent to Texas to scope out President Bush’s ranch in Crawford, and to case a major port in Freeport, Texas. According to a U.S. intelligence document, the mission “may constitute pre-operational activity.” The FBI also says it has evidence that the network may be scouting other possible U.S. targets. FBI sources tell NEWSWEEK that last year, now captured Qaeda operations chief Khalid Shaikh Mohammed ordered subordinates to identify buildings heated with natural gas that could cause an explosion. Qaeda operatives also conducted extensive computer searches of power plants, water reservoirs, transportation and bridges. U.S. intelligence officials say they have become much more adept at tracking the terrorists’ movements. Now they must figure out how to get one step ahead, instead of forever being one step behind.