REDWOOD CITY --

Three boys have admitted to sex-related crimes in connection with the assault of two 12-year-old girls during a Redwood City school field trip, a San Mateo County prosecutor said Tuesday.

Two boys, ages 13 and 14, admitted to lewd and lascivious conduct and could be ordered Aug. 5 to spend as much as eight years in a state juvenile corrections institution, said District Attorney Steve Wagstaffe.

A third boy, age 12, admitted to sexual battery and faces a year in custody.

Their cases resolved Monday, when their trial in Juvenile Court was to have started, Wagstaffe said. Cases are pending against two other boys.

The names of the boys were withheld because of their ages.

The attack happened in March when 20 students from Kennedy Middle School went on a social studies class field trip to Stulsaft Park in Redwood City, accompanied by their teacher, two chaperones and an assistant.

At some point during the trip, the boys took the two seventh-grade girls to a secluded area and assaulted them for five to eight minutes. Wagstaffe called the case unprecedented in his three-plus decades as a prosecutor.

Although the field trip happened in March, the girls did not say anything to school officials until June, when they spoke to a counselor.