A 12-year-old boy brought 100 rounds of ammunition, a knife and a flammable liquid to his Prince William County middle school last week, and he also burst into a school office and threatened about a dozen employees, students and parents, police said yesterday.

Police, school officials and witnesses filled in several details yesterday of what happened inside Bull Run Middle School for a terrifying 10 to 15 minutes Friday after the seventh-grader was discovered loading a rifle inside a restroom and before police stormed the building.

The fortuitous circumstance of two teachers unexpectedly coming to the office and then leaving and the calm presence of mind of another teacher kept the incident from spiraling out of control, they said.

The teacher told the boy, "You don't want to do this. Think about this and what will occur. Calm down," said Edward L. Kelly, Prince William County school superintendent. "He just bought time" before a police officer motioned him to get out of the way and arrested the boy without incident.

The boy had been spotted in a restroom by Assistant Principal Jamie Addington about 8:30 a.m. Addington called police and implemented the school's emergency plan. Under the plan, libraries, classrooms and offices were locked, lights were shut off and students and employees stayed away from windows and doors, sources and witnesses said.

Shortly after Addington left the restroom, the 12-year-old rushed into the main office before it could be locked. He pointed the gun, ordered everyone to get down and threatened to shoot people, police said.

Just then, two teachers approached the office, saw the boy with the gun and left, witnesses said. The boy "went after" them, according to an eighth-grade student who was in the office. As soon as the boy left the office, the people inside retreated to a back room and locked the door, the eighth-grader said. The boy with the gun returned, found no one in the office and went back to the main lobby.

That's when another teacher began talking to him. Officials would not identify the teacher.

Police have said the seventh-grader was trying to scare or even kill people at the 1,100-student school and then hold hostages to extort money. But after school officials locked the building down, police swiftly entered under a countywide plan devised after the 1999 Columbine school shootings in Colorado.

Authorities said they believe several other students plotted with the seventh-grader, who was often teased. A 13-year-old boy from Haymarket has been charged with conspiracy to possess firearms on school property. Police said that boy helped plan the incident but backed out before it happened.

Law enforcement sources said the 12-year-old boy arrived at school about 7:40 a.m. with his mother, Naomi Lewis, 38, a cafeteria worker at the school. She discovered that her son had brought a bag full of weapons, ammunition and butane fluid into the van, and a "discussion about them took place," police said.

She locked the vehicle but did not report the discovery to any authorities, police said.

"She used poor judgment in not going further," said Prince William Commonwealth's Attorney Paul B. Ebert.

Lewis has been charged with possession of a weapon on school property. She has been released.

She and her son entered the school, and she went to work. He stayed in the cafeteria until school buses began arriving. Police said the boy then left the building and opened his mother's vehicle with a key his mother did not know he had. He removed two rifles and a shotgun and entered a restroom to change into camouflage gear and a red bandanna for his face, police said. He began loading one of the rifles when Addington heard the sound, they said.

Authorities said school surveillance cameras caught much of the boy's actions on videotape.

"It will be very telling," Ebert said.

A Prince William County government source said that once police confronted the boy, he laid the weapon on the floor. "Then he started crying. All of a sudden he became a 12-year-old," the source said.

Leo Kudej III, a 14-year-old eighth-grader, said that shortly after 8:30 a.m., he was heading to the main office with a classmate to use the public address system. He and other students were involved in a year-end skit, and a teacher sent them to gather the students together.

Leo saw the 12-year-old dressed in camouflage and armed with the rifle outside the office but figured the gun "was a fake" and his attire was a costume for a different skit.

Leo and his friend entered the office, and the suspect came in behind them. "He told us to get on the ground," Leo said. When the two teachers walked in, the boy "told them not to run" and went after them, Leo said.

Seeing him leave, "we all ran behind the desks and then . . . we got in the bathroom," Leo said.

After police came and said they could leave the restroom, Leo was briefly handcuffed. "Just to make sure we weren't suspects or something," he said.

Despite the initial shock, Leo said he is not feeling any residual worry. "We were pretty calm," he said.

The 12-year-old has been charged with numerous crimes, including conspiracy to commit murder and conspiracy to commit abduction for money. If the boy is convicted on all the charges, he could be imprisoned until he turns 21, Ebert said.

Although fellow students said the boy was teased incessantly, Ebert said "in no way does that justify" the attack.

Naomi Lewis was charged with possession of a weapon on school property.This was one of three guns the student brought into his school, police say.