Prince George's County Congresswoman Gladys Noon Spillman collapsed from a heart attack last night at a Laurel shopping mall and was in critical condition at a county hospital, struggling for survival.

Spellman, 62, a Democrat seeking her fourth term in Congress, was visiting a Halloween costume contest for local children at the Laurel Center on U.S. Rte. 1 when she became ill about 6:30 p.m. When she arrived at nearby Greater Laurel-Beltsville Community Hospital, she was unconscious and did not register a pulse, officials said.

Doctors were able to detect a pulse after several minutes of treatment, and at 8:45 p.m., Spellman was transferred to the hospital's coronary care unit. Her eyelids fluttered once while she was being treated but she did not regain consciousness in the emergency room, officials said.

Hospital sources said last night that Spellman was considered to have only a 5 percent chance of survival. Although her heart had resumed beating, it had stopped long enough to endanger other body functions, these sources said. Spellman began breathing on her own about 30 minutes after arriving at the hospital, officials said.

Spellman, elected to Congress in 1974 after a long career in Prince George's County politics, has been considered an overwhelming favorite to win reelection next week against her Republican challenger, Kevin Igoe."Our prayers are with Mrs. Spellman and her family. We have ceased all campaign activities," a spokesman for Igoe said last night.

Spellman, who was to be one of several judges at the contest sponsored by the Rotarians and the Prince George's Chamber of Commerce, was descending three shallow steps in a pavilion of the mall known as "Centre Court," where the event was to be held, when she collapsed. "Suddenly she fell down. It happened in just a second," said Riva Soudehkeshian, a salesman at a nearby music store.

After her fall, Spellman "was sitting up on a walkway just to the left of the [contest] stage," said Dennis Campbell a salesman at another of the mall's stores who arrived just after the congresswoman collapsed. "She had her senses. One guy put his coat around her, and all of a sudden it looked like she was going to vomit."

Campbell said, "They laid her down, and I yelled to my manager to call an ambulance. A guy in a military uniform came up and started giving her CPR [cardio-pulmonary resuscitation]. Then a lady came up and gave her mouth-to-mouth." Campbell said an ambulance was not called for about 10 minutes, and it took six minutes for an ambulance to arrive.

Paramedics then tore off some of Spellman's clothing, pounded her chest and administered electric shocks and injections in an effort to start her heart again as she lay on the floor of the mall, witnesses said.

Witnesses said a companion of Spellman paced the floor near her in a daze, asking, "Is she okay?" and clutching her handbag, while a child in the costume contest burst into tears. "Let's go on," the contest director finally announced to the crowd.

Spellman was hospitalized and treated briefly last summer for pancreatitis, an inflammation of the pancreas not related to heart disease. About a year ago, she was forced to cancel at the last minute a planned trip to Cambodia because of what she said was a reaction to a shot that she had been given in preparation for the trip.

Before announcing that she would run for another term, there were widespread reports that Spellman was considering retiring because of her health.

"She's been working so hard campaigning," said County Executive Lawrence J. Hogan. "Everywhere I went she was there.She just went so hard and I guess it was just too much for her."

Spellman, in a telephone interview on Thursday, said she had been "taking it easy," in this year's campaign.

She had been criticized by Igoe, her young Republican opponent, for telling a weekly newspaper reporter that his nomination was "demeaning to Congress and an insult to the people to think they can't find somebody better qualified."

Spellman said that she meant nothing personal in the remark. She said during Thursday's interview that "if it should be decided that I would not continue to be the member of Congress, there are many more people who deserve a chance at it" than Igoe, who has never held elective office.

Part of her success in Congress had been her close attention to legislation affecting her constituents, many of whom are federal employees. In return for pursuing their interests as a subcommittee chairman on the House committee on Post Office Civil Service, Mrs. Spellman received relatively large contributions from political action committees of the various federal employe unions.

Eighteen years after she first entered politics, Spellman whose 5th Congressional District encompasses most of northern Prince George's, is considered to be the most popular elected official in the county, a fact that she sometimes points out herself.

Spellman started her career as a PTA activist, and them was elected a Prince George's County commissioner in 1962 on a reform ticket. She later was commission chairman -- then the highest county office -- and served on the first elected County Council between 1970 and 1974 when Republican Hogan's retirement from Congress prompted her to seek the seat.

By late last night, Spellman's family and personal physicians had gathered at the hospital, and administrators were preparing beds for family, staff and the reporters who had arrived.

If Spellman should die, her name would remain on the ballot in next Tuesday's election, although officials said a "deceased" sticker might be placed beside it. If she won the popular vote, a special primary election, then a special general election would be held for her seat within 80 days. However, her seat would remain vacant until the special election was complete, officials said.