BERLIN - Until last year, al-Qaeda's affiliate in North Africa was an isolated bunch of desert and mountain guerrillas, struggling to attract recruits, money and attention. Tuesday's bombings in the heart of Algeria's capital, which killed at least 31 and perhaps many more, are the latest sign that the network has improved on all three fronts since swearing allegiance to Osama bin Laden.

By targeting the Algerian Supreme Court and U.N. agencies, the attackers sent a defiant message to Algerian authorities and undermined the government's claims that the group's demise is near. They also served notice that no part of the country is safe from their reach, ending a decade of relative calm in heavily guarded Algiers.

Counterterrorism officials and analysts said the Algerian network's operations have become much more sophisticated since al-Qaeda adopted the group in September 2006, announcing a formal partnership and urging the Algerians to focus on French, U.S. and other foreign targets.

Since then, the local al-Qaeda branch has moved its fight from the Algerian countryside, where its pattern of attacks on police stations and military barracks had received little publicity outside North Africa. By recruiting suicide bombers - a new phenomenon in Algeria - and targeting civilians, it has learned quickly that it can seize global attention.

"I don't think this implies the terrorist danger from the group is any greater, but rather that it's just become more efficient," said George Joffe, a North Africa researcher at Cambridge University in England.

An obscure faction once known as the Salafist Group for Preaching and Combat took on a new name, al-Qaeda in the Islamic Maghreb, in January.

Maghreb

is an Arabic word for the region of North Africa stretching from Libya to Mauritania.

In April, it bombed the Government Palace in Algiers and a police station on the city's edge, killing 33. The explosions were the first suicide attacks in Algeria since the 1990s, when the country was mired in civil war, and the worst violence in the capital in more than a decade. In September, bombers targeted a convoy carrying President Abdelaziz Bouteflika, missing him but killing 22.

Meantime, the group has reinvented its propaganda wing, creating a polished Internet operation that lionizes its "martyrs" within hours of an attack and includes narrated videos of past bombings.

"It's remarkably sophisticated," said Evan Kohlmann, a New York-based analyst who studies Internet use by extremist groups. "It's one thing to carry out a suicide bombing. It's another thing to record video of the attack at the same time."

Last December, the al-Qaeda affiliate penetrated a protected military zone in Algiers, bombing a bus carrying foreign oil workers for the American contractor KBR. The Algerian driver was killed, and nine passengers were hurt. The attackers later posted a video of the attack as well as footage of how it was organized. One segment showed the plotters using the Internet to consult the Google Earth satellite-image site to track the bus' likely route.

The network began distributing its videos online three years ago. The first production, titled "Apostate Hell," was blurry and looked like "amateur hour," Kohlmann said. Since then, the group has set up a permanent Web site with recruiting pitches and footage of fighters assembling bombs.

Kohlmann said it was unclear why authorities had not shut down the site but speculated that they prefer to monitor it instead. Webmasters in Europe, particularly in Germany, provide crucial support to the group's Internet operations, he added.

The North African faction has direct connections to the media arm run by al-Qaeda's central leadership. About 12 hours after Tuesday's bombings in Algiers, a brief assertion of responsibility was posted on the al-Hisbah Islamic Network, a password-protected site that releases video announcements by bin Laden and his deputies.

Nine U.N. staff members were among those killed Tuesday, U.N. officials said yesterday, after mistakenly announcing the day before that 11 had died.

The total death toll remained unclear. The Algerian Interior Ministry said yesterday that 31 people were killed and scores injured. But rescue workers and hospital officials said the number was far higher.