An increasing number of Saudis who crossed the border into Iraq to fight the U.S.-led military occupation are returning home to plot attacks against the Saudi government and Western targets in the desert kingdom, according to Western counterterrorism officials and Saudis with ties to militant groups.

The Iraq veterans are serving as fresh recruits for an underground network in Saudi Arabia that, until recently, was led by an older generation of fighters that had trained in Afghanistan and was closely connected to al Qaeda and its founder, Saudi native Osama bin Laden. Many of those leaders have been killed or captured in recent months by Saudi security forces.

Today, the proclaimed new chief of the primary militant group in the kingdom is Saleh Awfi, 33, a Saudi who journeyed north last year to join Ansar al-Islam, an Islamic radical group in Iraq that the U.S. government has branded as a terrorist organization. Awfi stayed for a few months, barely surviving U.S. aerial bombardment, before deciding to return and take up arms in his home country, according to a former Saudi radical who met with Awfi last year.

Other Saudis are returning after spending time in newly established training camps across the Red Sea in remote parts of Sudan where central government influence is weak, said a European intelligence official whose government is advising Saudi officials on their domestic terrorist threat.

For years, the religiously conservative Saudi royal family considered itself immune to attacks from Islamic extremists, but since May 2003, armed insurgents have shaken the government with a series of bombings and shootings resulting in more than 80 deaths.

The violence has helped drive oil prices to record highs, due to concern that the radicals will target pipelines or refineries.

The Saudi government sealed its border with Iraq last year and has played down evidence that Saudi radicals have contributed to the insurgency there. But Western counterterrorism officials and diplomats here said a small but significant number of Saudi veterans of the fight in Iraq have already made their way back and are helping carry out attacks in the kingdom.

Some Western officials express fear that the homecoming will grow if Iraq stabilizes. They also say they worry that the trend could become an echo of the 1990s, when thousands of Saudis traveled to Afghanistan to enlist in training camps sponsored by al Qaeda and other Islamic groups. Many of those radicals were dispatched around the world to launch attacks, including the Sept. 11, 2001, hijackings in the United States.

After the Iraq insurgency is over, "there will be people who are freshly trained in the art of guerrilla warfare," said a Western diplomat who spoke on condition of anonymity. "It's a real concern. How big a concern? I don't know. It clearly doesn't take too many to do a lot of damage."

Young Leaders Fill Ranks

Recent statements from Saudi militants underscore the Iraq connection. A cell that asserted responsibility last month for the beheading of Paul M. Johnson Jr., a Lockheed Martin Corp. employee kidnapped in Riyadh, called itself the Fallujah Brigade of a broader group known as al Qaeda in the Arabian Peninsula. Fallujah is a city west of Baghdad where insurgents have repeatedly clashed with U.S. forces.

The leader of that cell, Abdulaziz Muqrin, who was killed three weeks ago in a shootout with security forces, suggested in a statement that appeared on the Internet last fall that there was substantial crossover between the group in Saudi Arabia and foreign fighters in Iraq. "We are exerting our efforts there," Muqrin wrote, according to Janes Intelligence Review, a London-based publication.

Another example of Saudi fighters coming home from Iraq emerged in late June, when Othman Amri surrendered to Saudi officials under a recently declared amnesty program. Amri had been No. 19 on a list of the kingdom's 26 most wanted terrorism suspects. His family told Saudi reporters that he spent much of last year in Iraq as part of the insurgency there.

Like their compatriots in Iraq, cells operating in Saudi Arabia have repeatedly stated that their primary aim is to drive out all "infidels," including more than 100,000 Western expatriates who help run the country's oil industry and whose military and technical support is crucial to the Saudi government.

Although the border with Iraq is officially closed, many Saudi fighters are still finding their way back into the kingdom. Saudi officials said the nation's 900-mile border with Yemen has become an even more favored reentry point. Officials have reported that border guards have confiscated tons of explosives and ammunition from smugglers. In response, the Saudi government has begun construction of a concrete barrier along the Yemeni border, which runs through an especially desolate stretch of desert and mountains.

The frequency of attacks within Saudi Arabia has picked up in the past two months, as attackers have conducted deadly raids on Western compounds in Khobar and blown up a police building in Riyadh. In May, they began to target individual Westerners in Riyadh, killing a German man at a bank machine and stalking two Americans before fatally shooting them at their homes.

Saudi security forces have arrested hundreds of alleged radicals and sympathizers but largely have been unable to stop the violence since it ignited 14 months ago. Saudi leaders said they are optimistic, however, that their efforts reached a turning point when security forces killed Muqrin and three of his lieutenants in a shootout in Riyadh. Since then, security forces have gone on the offensive and have rounded up numerous other suspects by identifying several hideouts they used in the Riyadh area.

Saudi security officials said they have disrupted each of the five cells known to exist in the kingdom. Although 12 of the government's 26 most wanted terrorist suspects remain at large, Western and Saudi counterterrorism officials said the movement has been dealt a heavy blow.

"The terrorist networks created over the past few years have been almost entirely compromised and will have to be rebuilt largely from scratch," said Nawaf Obaid, a Riyadh-based security consultant. "There are no longer any known senior, battle-hardened bin Laden associates left to run the organization or create new cells."

Most of the original architects of that network were veterans of al Qaeda camps in Afghanistan, including several who were personal acquaintances of bin Laden, according to Saudi officials.

The Saudi government has long drawn criticism for allowing Islamic extremism to flourish within the kingdom and encouraging it abroad. Many Saudi leaders have minimized their responsibility, arguing that the insurgents became radicalized only after leaving the country.

Prince Saud Faisal, the Saudi foreign minister, told reporters in Jiddah last month that "the university of Afghanistan" had brainwashed many Saudis. "They were being mentally reformed and turned into killing machines," he said.

But other officials said most of the leaders trained in Afghanistan have been killed or captured, creating a void that is being filled by younger people whose primary fighting experience comes from Iraq or North Africa, or who have never been out of Saudi Arabia.

"The Afghanistan group is starting to get aged," the Western diplomat said. "A lot of them are now out of the system. I don't know how many of those guys are really left."

Other analysts said the Afghan veterans presented a more serious threat and questioned the ability of their replacements.

"You have two distinct generations," said Ramzi Khoury, a journalist who tracks violent extremists in the kingdom. "You have those guys who came from Afghanistan, who are very well trained, very effective, very well brainwashed. And you have the kids. The kids are angry and depressed, angry over what's going on in Palestine and Iraq."

Weakness on Both Sides

Awfi, the apparent new leader of al Qaeda in the Arabian Peninsula, traveled to Afghanistan before Sept. 11, 2001, and met with bin Laden, according to interviews his family has given to Saudi reporters. More recently, he spent time in northern Iraq, but returned to Saudi Arabia after he was nearly killed during the U.S. invasion, according to Mohsen Awajy, a lawyer and former Saudi radical who said he was contacted by Awfi last year.

Although Awfi's militant resume looks impressive on paper, his ascension is a sign that the group has become severely weakened, Awajy said. "If he's going to be the next leader of al Qaeda in Saudi Arabia," he said, "then they are in big trouble, because he has no capability as a leader."

The Saudi security forces, however, have been confronted by weaknesses of their own. Counterterrorism experts and government officials said the kingdom was ill-prepared to respond to terrorism, in part because the government mistakenly assumed it would never become a target.

That began to change in May 2003, as radicals launched attacks not just against Westerners, but also against Saudi citizens and the government.

"The Saudi government was jolted out of its denial," said Jonathan Stevenson, senior fellow for counterterrorism at the International Institute for Strategic Studies in London.

Although the government now says it takes terrorism much more seriously, its military and security forces were not trained or equipped to handle the threat and have had a hard time adjusting.

More than a dozen Saudi police officers and National Guardsmen have died in shootouts, in many cases because they were outgunned. In May, three of four gunmen who killed 22 people and took hostages in a Western office and residential compound in Khobar escaped, even though they were surrounded by hundreds of security forces, including a special anti-terrorist Saudi SWAT team.

"Our security apparatus is not well trained in combating terrorism, but they are learning," Ibrahim Alebaji, a former deputy interior minister, told Saudi television last month.

Saudi Arabia's rulers have requested assistance from Western governments to help with training and intelligence gathering. Western counterterrorism officials said the Saudi capability to fight terrorism was improving, but that the kingdom still needed to reorganize its many overlapping military, law-enforcement and security agencies.

"Saudi Arabia did not believe -- or did not want to believe -- that it had a problem for a long time," said a German intelligence official who spoke on condition of anonymity. "They are not underestimating the problem any longer . . . But they first need to create the structures to fight the problem."

Saudi officials used to bristle at such critiques, but have begun to acknowledge the need to revamp their anti-terrorism bureaucracy. Two weeks ago, Prince Saud of the Foreign Ministry met with Western diplomats and businessmen in Jiddah to reassure them that the government recognized the challenge.

"He was quite explicit," said another Western diplomat who attended the meeting and also spoke on condition of anonymity. "He said, 'Yes, we have made mistakes. And we are learning from those mistakes.'"

Technical assistance from the West has already produced results. A newly trained Saudi forensics unit was recently able to confirm, based on physical evidence, that a single al Qaeda cell was responsible for carrying out at least five separate attacks, according to a Western official.

Researchers Robert Thomason and Margot Williams in Washington contributed to this report.

Saudi police at the scene of a May attack by suspected militants, who have increased strikes in the past two months.