Backstage in the auditorium of Bull Run Middle School, Jessie Kerns and her classmates clasped hands and prayed in a circle. They played the game hangman to take their minds off the 12-year-old gunman prowling the hallways.

Over in the chorus room, Andrew and Alex Strittmater, both 14, taped construction paper over the door's windows so the 12-year-old wouldn't see through them and then sat pressed against a wall.

"We saw feet moving underneath the door," Alex Strittmater recalled. "We were thinking, what happens if he comes over and shoots the lock open?"

That morning, June 18, the last day of the school year, a 12-year-old student dressed in camouflage and armed with a high-powered rifle burst into the main office of their school, threatening to shoot people, police said. About 10 minutes later, officers entered the school and saw a teacher trying to talk the boy out of doing something dangerous. Police directed the teacher to move away, then challenged the suspect and arrested him.

No shots were fired at the Prince William County middle school, and no one was killed or injured. But the day was frightening nonetheless, if only because of the protracted uncertainty. During a lockdown that stretched for more than an hour, some students spent anxious moments praying in eerily quiet classrooms. Others passed around Jolly Rancher candies, used wet towels to keep cool in a hot restroom and considered, in their most fleeting thoughts, whether they would become a sequel to the Columbine High School shootings in Colorado five years ago.

This week, the 12-year-old boy goes on trial in a Prince William juvenile courtroom, charged with numerous crimes, including conspiracy to commit murder and conspiracy to commit abduction for money. A 13-year-old Haymarket boy, who police said helped plot the siege but pulled out at the last minute, has been charged with conspiracy to possess firearms on school property and will be a co-defendant during the trial Wednesday.

Virginia law closes the court proceedings to the public because the boys are younger than 14.

Friends and fellow students have said the 12-year-old boy was retaliating for being picked on for his weight and style of clothes. The boy's attorney, Marjorie Alexander, declined to discuss his case because he is a juvenile, saying only: "Schools need to be more aware of bullying and they need to see who's doing what. Everybody has to take a responsibility in this. This is a wake-up call for everybody. You go to school to get your education, not to be harassed or tormented."

Jessie Kerns, 14, was in the auditorium, getting ready to play Quince in "A Midsummer Night's Dream," when another student told her there was someone in the hallway trying to scare everyone with a fake gun.

Jessie peeked out and saw a bespectacled boy wearing camouflage pants, black boots and a red bandanna across his face, clutching a realistic-looking gun.

"He saw me and he started to lift his gun and pull it toward his chest," she recalled. "My dad has a gun like the one he was carrying. I closed the door and said, 'That's not a fake gun -- run!' We all ran to the backstage area, and I turned around and his face was up against the window looking through."

The backstage quickly became a tense shelter for Jessie and about 10 classmates, trapped while the seventh-grader stormed into the main office about 8:30 a.m. and the school went into lockdown. All across the 65-classroom school, students holed up in dark rooms and did anything they could to keep safe and sane during that agonizing time, waiting for the boy to be subdued.

At first, when Jessie and her classmates went into a backstage room, all they could do was ask questions: What kind of gun was it? What did he look like? What if we got shot? One student wondered whether he was on a possible hit list.

"Other kids were freaking," Jessie said. "The guys were saying , 'Yeah, we're going to get shot,' and then some girls started to cry. Two or three boys were laughing. At one point, I was yelling at the boys to shut up."

After the group joined hands in a circle to pray, Jessie moved a chalkboard in front of the door window to obstruct the view and to play hangman. She tried calling her mother on her cell phone but couldn't get a signal.

A dozen or so students and teachers were stuck inside the office where the 12-year-old was brandishing the weapon and giving orders. Scott Shellum, 14, an eighth-grader, saw the boy in the hallway outside the office and thought he was part of one of the school's end-of-the-year skits.

"I ran up near him and said, 'Put the gun away.' He didn't respond," Scott said.

When Scott and a friend entered the office moments later, they saw about eight people crouched up against the wall, kneeling down, with their hands over their heads.

"Then a security officer told [me and my friend] to get down, and she pushed us down. We didn't know what was going on," Scott recalled.

The security officer was standing up, asking the 12-year-old what he wanted.

"He said, 'I am not here to hurt anyone,' in a normal voice," Scott said.

The 12-year-old with the gun spotted a secretary crouched under a desk holding a phone and pointed the gun at her, Scott said. "Disconnect the phone line," the 12-year-old ordered.

When two teachers walked by the office, the boy chased them, giving Scott and the rest of the hostages time to run and take cover in the health clinic and its restroom. The students, some dressed in costumes, were hot and thirsty, so they put wet paper towels in a refrigerator for 10 minutes and rubbed them over their faces.

"One of the boys inside was really good friends with the shooter and said that the shooter had actually talked about this happening, but he thought it was a joke," Scott said.

About an hour and a half later, he said, Prince William police knocked on the door, ordering them to exit single file.

Inside her classroom, one teacher ran down a list ingrained in her head during "Code Red" training drills: Lock the door, turn the lights off, send an e-mail detailing who's in the room.

"I've been a teacher for 17 years and I wasn't counting on this [experience], but I wasn't taken aback," said the teacher, who spoke on the condition that her name not be used. "You never think it's going to happen, but when it does, you do what you've been trained to do. The kids knew what the drills meant, and they reacted in the way they're supposed to."

Students in her class sat quietly in the back, reading yearbooks with a flashlight. One girl told the teacher she was frightened.

The Strittmater brothers said they will never forget their teacher's instructions as they sat across the hall from the main office in the chorus room: "Pray, and if you don't know how, this is a good time to learn," she told them.

Andrew, left, and Alex Strittmater taped paper over windows so the boy with the rifle couldn't see in.