Hayner R. Flores, an alleged gang member accused of hacking a Fairfax County teenager's hands with a machete, came to court yesterday prepared to admit that he wielded the weapon -- but not that the crime was connected to the violent Mara Salvatrucha street gang.

The refusal meant that Flores fulfilled only half his anticipated plea agreement with prosecutors, prompting Circuit Court Judge R. Terrence Ney to schedule a Sept. 22 jury trial instead.

Flores, 18, of Annandale, faces two felony charges -- malicious wounding and illegally participating in a street gang -- in the attack that left the 16-year-old victim missing four fingers on his left hand and suffering deep cuts to his head and back.

He was scheduled to plead guilty yesterday to both charges, in return for a promise that prosecutors would not seek to convict him of more serious offenses carrying a longer sentence. During a brief hearing, however, Flores tried to plead guilty to malicious wounding but said he did not illegally participate in a gang.

His attorney, Gary Greenbaum, would not say why Flores changed his mind. "He was perfectly within his right to do what he did, and the judge recognized that," he said.

The victim, who attended the hearing, declined to comment.

After the plea agreement unraveled, Assistant Commonwealth's Attorney Jay R. Nanavati upgraded the charge against Flores to aggravated malicious wounding, which carries a sentence of 20 years to life. He could have been sentenced to no more than 20 years for pleading guilty to the lesser charge.

The machete attack has sparked new efforts by police and community officials against gang violence. Police have said the attack was an act of revenge in a running feud between Mara Salvatrucha, also known as MS-13, and the South Side Locos.

The victim was attacked about 1 a.m. May 10 by several people as he walked along Edsall Road, police said. Jose Cruz, 19, of Annandale and Cristobal Medrano, 17, were arrested in the attack. Medrano, of the Alexandria area, was charged as an adult and, like Cruz and Flores, faces trial in Circuit Court.