Less than 24 hours after police issued an all-points bulletin identifying him as the prime suspect in the "Night Stalker" slayings, Richard Ramirez was captured and beaten today by residents of an East Los Angeles neighborhood.

Police took Ramirez, 25, into custoday this morning and booked him later in the day for investigation of murder. Before he was booked, however, Lt. Vic Walls of the county sheriff's office told reporters, "We're happy to announce that the individual we have in custody is Richard Ramirez, the Night Stalker."

The serial killer nicknamed Night Stalker has been linked to 16 murders and 21 assaults across California during a seven-month rampage.

Ramirez's capture was filmed by members of a television news crew en route to another story when they encountered the crowd and arriving police cars in the predominantly Hispanic neighborhood.

KNBC news director Tom Capra said that as Ramirez was put into a patrol car, he said, "It's me, it's me, it's me," and added in Spanish, "I'm lucky the cops got here."

Los Angeles Police Cmdr. William Booth said the incident began when shoppers in a city liquor story reported seeing Ramirez pick up a newspaper, spot his photograph on the cover and flee. He ended up in East Los Angeles, where police and neighborhood residents said Ramirez tried to steal a car about 9 a.m. PDT but crashed it into a house as he tried to back out of a driveway.

Paul Martin, who lives in the area, said Ramirez then ran across the street and grabbed a woman who had just climbed into her car, "punched her in the stomach" and tried to drag her from the car.

According to neighbors' accounts, the woman's husband came out of their house and began fighting with Ramirez. Several neighbors joined in, and Ramirez was hit in the head with a long metal object, variously identified by residents as a fence post and a crowbar.

Ramirez broke away from the angry group and ran down the street, a neighbor who participated in the struggle told a local radio station. "The man ran away," the neighbor said, "and we chased him and caught him about halfway down the street. I think he was tired and dazed. He was bleeding already . . . . He said, 'Man, let me go.' I said, 'You're not going nowhere.' "

Other neighbors summoned police.

Police said they had linked Ramirez to a fingerprint found in a car stolen Aug. 24 and spotted the next day at the scene of the Night Stalker's latest attack.

A 1984 police mug shot of Ramirez closely resembles the composite sketch of the Night Stalker distributed by police.

According to police records, Ramirez was born in El Paso, has spent his adult life in Los Angeles and San Francisco and has been convicted on drug and auto-theft charges.

Ramirez's appearance is similar to the description of the Night Stalker that some victims gave police: he is 6 feet 1 and weighs 155 pounds, has curly black hair, bulging eyes and badly stained, extremely decayed teeth.

Police said he has used several aliases, including Noah Jimenez, Richard Moreno, Nicholaus Adame, Richard Monoz and Richard Mena.

Asked if the Night Stalker case is closed, Lt. Dan Cooke of the Los Angeles Police Department said, "It's a matter of checking all the evidence, and what we find out in the interview" of Ramirez.

Police bandaged Ramirez's head before they took him from the scene of his arrest. Cooke would not say whether Ramirez's injuries were serious but said they were to his head and hand.

Most of the Night Stalker's attacks have been in Los Angeles County, but the killer also struck in San Francisco and Orange County. He entered homes at night, mostly through unlocked doors and windows, and attacked victims ranging in age from 16 to 83, shooting many in the head, beating or knifing others and raping some.