A 17-year-old honor student at T.C. Williams High School accused of stabbing three Alexandria police officers will be tried as an adult after a judge transferred his case out of juvenile court yesterday.

Keegan A. Zacharie, 17, has been in juvenile detention since Sept. 2, when authorities say he stabbed three officers who were questioning him after one saw him shining a flashlight into parked cars in Old Town.

He is charged with three counts of malicious wounding of a law enforcement officer, a felony that carries five to 40 years in prison for each offense, with a mandatory minimum of two years per count.

Under questioning by Commonwealth's Attorney S. Randolph Sengel, the police officers described a confrontation that took place about 1:30 a.m. in the 300 block of Duke Street.

Detective Venus Roman said she was investigating a series of burglaries in the neighborhood when she saw Zacharie peering into the cars. When she questioned him, he gave a false name but was otherwise cooperative, she said.

When other officers arrived, one of them patted down Zacharie. Roman said she searched his bag, where she found a crowbar, gloves and a little pouch that Zacharie said contained a "spyglass."

At that point, the officers testified, Zacharie hit an officer on the head and began to struggle with Roman and other officers. Roman sprayed Zacharie with pepper spray, but he escaped and ran down the street. Police arrested him a couple of hours later in a garage nearby.

After the struggle, Roman and the other officers testified yesterday, all three realized they had sustained knife wounds. Roman said her arm was cut "to the bone." Officer Mark Peterson, who still had bandages on his neck, said he was wounded in four places, and Officer Sean Casey stood up to show the judge where his abdomen had been pierced, between his protective vest and his belt. Casey said he saw a knife in Zacharie's hand; police later found one in the garage where he was arrested.

All three officers were treated at hospitals, and Peterson said he has not returned to duty because of his injuries.

The arresting officer, Detective Victor Antonio Ignacio, described finding Zacharie in the garage, bleeding from the hand.

Almost immediately, he said, Zacharie seemed remorseful. "He wanted me to tell the officers that he was sorry for what happened," he said, adding that Zacharie told him that he had panicked when he thought the officers were going to arrest him. He added that the apology seemed credible.

During the hearing, Zacharie sat quietly in a navy jacket, conferring at one point with his attorney, Jonathan Shapiro. His left hand was covered with a bandage. His parents attended the hearing and declined to comment afterward.

Shapiro did not dispute the officers' accounts. "He shouldn't have done it. This was the worst mistake he's ever made in his life," he said. But he said his client's actions were a result of panic and not malice. He listed Zacharie's academic honors, including receiving a 4.18 grade point average and being named a National Merit Commended Student several days ago, and asked that he be allowed to return to his parents' house to await trial.

Chief Judge Nolan B. Dawkins of Alexandria's Juvenile and Domestic Relations Court rejected Shapiro's request to consider a lesser charge and said a request for bond must be considered by adult court.

Zacharie remains at the Northern Virginia Juvenile Detention Center in Alexandria.