At 1 a.m. a convoy of armored personnel carriers, bristling with soldiers on alert, rolls out of the white-walled compound of the Peruvian Army and into the dim streets of Lima.

Taking up positions around the capital's center, the heavily armed patrols have instructions to stop anyone who moves during a four-hour curfew that came with a state of emergency announced Feb. 7 by President Alan Garcia.

For now, the military's high-profile presence here has brought a shaky respite after a recent wave of terrorist and criminal violence that beset Lima's ill-equipped police and produced a pervasive sense of anxiety and instability.

This enforced calm was momentarily shattered Friday night when leftist guerrillas in speeding cars hurled sticks of dynamite at the U.S. Embassy, five other foreign diplomatic missions and about 10 government targets. No damage was done to the U.S. building and no one was reported hurt, but the blasts blew holes in doors or shattered windows at the embassies of Spain, West Germany, India and China.

The attacks came on the eve of the birthday of the ruling American Popular Revolutionary Alliance party's founder. A fire in the shape of a hammer and sickle then was set on a hillside overlooking Lima, a sign traditionally used by Sendero Luminoso (Shining Path), the Maoist guerrilla movement that Peruvian authorities have been battling for six years.

A spate of dramatic explosions and kidnapings here has highlighted a rise in crime and a deterioration in the ability of law enforcement agencies to cope with it, turning this South American capital into one of the most dangerous in the world.

Lima has swelled in the past three decades into a sprawling metropolis, ringed by shantytowns crowded with Indian peasants from the Andean highlands seeking work. The city's growth has outstripped the supply of adequate housing and public services -- including police protection -- and poor neighborhoods have become breeding grounds for delinquency.

"Lima was a lovely city 30 years ago, with an excellent infrastructure and enough water, sewage and police for the 500,000 people who lived here," said banker Juan Francisco Raffo. "Now the suburbs have been turned into slums, while the police and official record keepers haven't been able to keep up."

When Garcia, formerly mayor of Lima, became president in July after a decisive electoral victory, the capital's police had only 22 patrol cars for a population approaching 6 million. By appropriating vehicles from government ministries and state enterprises, and by new purchases, authorities have increased that number to 250, according to Interior Minister Abel Salinas.

But Salinas estimated in an interview that more than 80 percent of the public have no confidence in the police, who have a reputation for corruption and inefficiency.

In a reorganization of Peru's three police agencies, which number about 85,000 employes, Garcia has purged 1,700 officers and agents in six months. Some of the dismissed police have been reluctant to surrender their guns and are thought to be behind part of the recent crime wave, a suspicion that Garcia encouraged by speaking, just before the state of emergency was announced, of a "new violence, more professional and mysterious."

Garcia's decision to put the armed forces in charge of security in Lima under the state of emergency was widely interpreted here as not only a check on left-wing terrorists but also on embittered policemen.

Many private businesses and wealthy individuals have taken to providing their own security. After a rash of robberies, local banks hired an American security specialist two years ago to devise a protection system that today includes a private police service. In the final months of last year, kidnapings in Lima rose sharply, making this city second in the world after Beirut in abductions, according to officials here. The number of reported kidnapings dropped in January after the arrest of two gangs -- one including two active policemen and two ex-agents of Peru's equivalent of the FBI. But some affluent Peruvians have moved abroad with their families and are planning to commute to Peru when necessary to tend to business interests.

"Right now, terrorism and kidnapings are doing more damage to Peru than anything in the economy," said Claudio Herzka, an economic analyst. "People are just simply scared. You can take anything until they start taking your children."

In an interview, Garcia acknowledged that the state of emergency in Lima was mostly a symbolic measure in response to public demands that the government do something to restore tranquility.

That move came at the end of an exceptionally violent week. A police captain and a former Army intelligence official were assassinated in the capital, and a rash of bombings shook Lima. As many as 16 explosions occurred simultaneously, suggesting the bombs had been planted by a large, sophisticated group.

Opposite the presidential palace, arsonists set fire to a commercial block containing stores and a hotel. Even in a city that had grown accustomed to blackouts, explosions and daytime killings, the attacks produced a fresh sense of alarm.

Under the state of emergency, public assemblies have been banned and security forces are empowered to raid private homes and arrest suspects without warrants. But human rights activists say they have not received reports of abusive behavior by patrolling security units.

"This state of emergency has more a political sense than a repressive one," said Diego Garcia-Sayan, a lawyer and executive secretary of the Andean Commission of Jurists. "It is not being used as such things normally are -- as a juridical framework for generalized repression."

For Garcia, a 36-year-old social democrat, the decision to call out the military has underscored his lack of success so far in combating the Shining Path guerrillas. While states of emergency have been in effect since 1981 in several southeastern Peruvian provinces, where the extreme leftist group began, this is the first time since 1978 -- when Peru was under military rule -- that a curfew has been imposed on the capital.

When Garcia took office last July, he moderated the antiterrorist tactics of the more conservative government that preceded him. He curbed military sweep operations in Andean highland regions where the rebels are rooted. He channeled new agricultural assistance to impoverished backland areas. He offered a dialogue with the guerrillas.

But Sendero has refused to quit its violent campaign. In a communique slipped to journalists in Ayacucho after the state of emergency in Lima was declared, the guerrillas said Garcia's administration "has not made any political, social or economic difference," and added that "only through armed struggle will we change this society of exploitation." The statement warned of plans to assassinate leading provincial government members and included a death list of 10 top Army, police and political officials.

Having failed to make contact with the extremists, the Peruvian leader no longer expects to be able to negotiate. "They are incapable of distinguishing between this government and previous ones," Garcia said.