A veteran animal keeper at the National Zoo was attacked, mauled and apparently bitten yesterday by Ling-Ling, the zoo's prize female giant panda, near a gate leading to the animal's outdoor yard.

The keeper, Edwin Jacobs, 52, a 20-year zoo employe, was taken to George Washington University Hospital. A hospital spokeswoman said that Jacobs had been "gnawed" by Ling-Ling on an ankle, his chest and back, and had scratches on his arms. He was given a tetanus shot and antibiotics for his wounds, she said.

Both Jacobs and the panda previously had been inoculated against rabies, authorities said last night. Jacobs was released from the hospital about 7:30 p.m.

Jacobs said last night that during the panda's unexpected attack, which came while his back was turned, all he could think of was "getting her the hell away from me."

He said that at about 1 p.m., shortly after Ling-Ling's mealtime, he went to check on her, but failed to spot her in the mirror that normally permits the animal to be seen without opening her outdoor cage.

The keeper said that he opened a sliding gate and stepped into the panda's cage just far enough to note that she was there, asleep in a corner, about 30 feet away.

Then, he said, he bent to pick up a stray piece of bamboo, tossed it out of the cage, and turned to go back into the keeper's enclosure and shut the gate.

But in the few seconds that his back was turned, he said last night, the panda, with a big growl, was on him. First, he said, the 250-pound animal struck him with a paw.

"Then she had me down . . . then she grabbed my right leg with her mouth," he said. "Then I hollered for help and she was grabbing me and trying to bite me."

When he got up and tried to flee, he said, he found one shoe soaked with blood. There were scratch marks on his left shoulder. His right leg bore a deep laceration, where he evidently had been bitten.

A witness, Michael Goldfein, 31, of Alexandria, said that he was watching Ling-Ling at about 1 p.m. from an overhead outdoor balcony when he saw the 14-year-old animal, who was resting against a wall, race toward a gate connecting the yard and the panda house.

"I heard a lot of clamor of metal and then I heard a scream of terror," said Goldfein, whose view from the overhanging balcony was partially obscured. "I heard lots of metal banging and clanging. Everybody sort of froze."

Goldfein said that Jacobs called for someone to get another keeper. A second zoo employe arrived four or five minutes later and entered the yard. Goldfein said he could not see either Jacobs or Ling-Ling.

Hoage said that zoo officials could not say immediately how long the attack lasted. The panda house was closed to the public following the incident.

Besides its larger indoor pens, the panda house holds smaller transfer, or "shift," pens that enable workers to isolate the animals during feeding or pen cleaning.

Jacobs, of 443 Newcomb St. SE, regularly works around Ling-Ling and her male counterpart, Hsing-Hsing, according to Hoage. But Hoage said it is "not typical" for a keeper to enter an occupied panda enclosure. He said zoo officials will question Jacobs about his reasons for going in.

The pandas are regarded as aggressive and elicit considerable respect from zoo employes, according to Hoage. Ling-Ling is the more aggressive of the two, he said.

"People always say how lovable and cute they are -- and they are," Hoage said. "But we always remind people that they are wild animals."

Pandas have "some of the strongest jaws in the animal kingdom," he said. "The mouth is a powerful masticating machine."

Ling-Ling normally is fed twice daily with a diet consisting of 30 to 40 pounds of bamboo shoots, four quarts of a honey and rice gruel, eight ounces of horse meat, 12 carrots and eight apples. Feeding times are 11 a.m. and 3 p.m.

Hoage said visitors frequently ask if zoo workers play with the pandas. "The answer is absolutely not."

Ling-Ling and Hsing-Hsing were presented to the zoo in 1972 as gifts from the People's Republic of China. Since then zoo officials have succeeded in mating the animals, but there have been no surviving offspring.

Ling-Ling gave birth to a stillborn male cub last August. A year earlier, a male cub died of pneumonia soon after birth.

Ling-Ling bit a veterinary intern on two fingers while she was being sedated last December for a blood test that later showed evidence of a kidney disorder that almost cost the animal's life.

Zoo spokesman Hoage said the intern received several stitches.