When a 30-year-old psychologist answered a knock on his door yesterday afternoon, three juveniles, armed with what appeared to be a rifle covered by a blanket, barged into his eighth-floor apartment in Alexandria.

But when the assailants let the blanket slip, revealing a baseball bat instead of a gun, police said the psycholigist drew his own handgun, creating a melee in which one youth leaped through a window to the ground, a second was shot in the head, and the third attempted to escape down a telephone cord on the outside of the building.

Police said two of the youths were critically injured and the third, who scaled down the cord to a seventh-floor balcony, was uninjured. All were said to be 17 years old and from Northwest Washington.

"Yeah, I would say it [the robbery attempt] was amateurish and very unusual," said Police Lt. Walter Calhoun. "The guy who climbed down over the [balcony] railing was very glad to see police."

Residents at Landover House, the 17-story highrise near the Arlington-Alexandria border where the drama unfolded, identified a man who fought off the three youngsters as Ronald Irvin Taylor, a management analyst for the D.C. Department of Labor. Taylor, who said he didn't know the youths, was not hurt or charged in the incident, police said.

An Alexandria police spokesman said last night, however, that "evidently one of them knows Mr. Taylor."

Under Virginia law all three are classed as juveniles and police cannot release their names.

"The police are investigating it. It was an attempted robbery . . . I really don't want to discuss anything," he said last night.

Taylor, who was described as a former teacher at Virginia Commonwealth University in Richmond and a television weatherman there, had the .32-caliber revolver on him when he answered a knock at his apartment door, according to police. Investigators said Taylor emptied the gun, firing as many as six shots.

The two injured juveniles were listed in critical condition at Alexandria Hospital last night. Police said both appeared to have been shot. The youth who fell had been shot in the hand and had suffered a grazing wound on his head and appeared to be paralyzed from the waist down.

The other youth who was found inside the apartment with a gunshot wound in the head was being operated on last night.

"You'd think a shrink might just try to talk them out of it, but this guy must not have been kidding," said tenant Doug Miller, adding that Taylor's apartment was a shambles after the incident. "Gosh, what a mess."

"It sounded like a fight to us," said Vicki Butterfield, a resident of an adjacent apartment. "I went to look out from the balcony and there's Ron telling me to call the cops. 'Three guys are in my apartment,' he said."

Then Butterfield saw that one of the men was lying on the soft moist ground near the building's swimming pool, while the second man apparently had ripped out the telephone cord and used it to climb to the balcony below, she said.

After Butterfield dashed to the hallway, "Ron gave me his gun and told me to shoot if they came out," she said.

Police Sgt. Al Levesque said that police were called to the scene at 12:45 p.m. to investigate a shooting complaint at Apartment 802 in the building that is well known for its spectacular view of the Washington skyline.

"We're carrying it as an apparent robbery attempt," Levesque said, adding that charges had not been filed against anyone, including the uninjured youth who was being held in police custody. "They [the three youths] announced that it was a robbery and that's when all hell broke loose."

The fight left Taylor's apartment "a complete mess. There's blood and glass all over, furniture overturned. There was blood in the hallway, too," said tenant Russell Woodman.

Nelson Andrews said that he was about to fall asleep in a fourth-floor apartment when he saw "a large blur go past the window. I said to myself: 'Damn, that looked big enough for a man!' [Then he saw] this guy on the ground and police pointing their guns up at this other guy who was climbing down from a floor above me."

Authorities said that the youths were clad in street clothes and wore no disguises such as masks. Some Landover House employes said that no one carrying a blanket had been seen at the main entrance to the building. Others speculated that the youths could have entered through an unlocked rear door and then used the staircase.

There was no apparent reason offered by police why the youths went to Taylor's apartment, nor was it learned if they attempted to enter other apartments. Residents said the building had not experienced any crime problems recently.