WOODBRIDGE, Va. - A 20-year-old student opened fire in a community college classroom Tuesday, but did not hit anyone and was arrested in a hallway, police said. No injuries were reported.

Suspected gunman Jason Michael Hamilton was arrested soon after the shots were fired, Sgt. Kim Chinn, spokeswoman for Prince William County Police said. He was charged with attempted murder and discharging a firearm in a school zone and was held without bond. It wasn't immediately known if Hamilton had an attorney.

"The teacher hit the floor when she saw a gun come up," said Chinn.

Chinn said the student, armed with a high-powered rifle that he owned, fired several shots and left the classroom. Officers found him in a hallway where he was co-operative and was taken into custody, Chinn said.

Police have not discussed a motive. "I assume he's upset," Chinn said. "He walked into a classroom and shot at a teacher."

Police received a report of an "active shooting" on the campus Tuesday afternoon. It quickly prompted fears of another mass shooting like the massacre at Virginia Tech that killed 32 people in 2007.

School officials locked down the campus and SWAT units swept the buildings room by room before letting people leave.

"We heard a loud noise, it sounded like a desk fell over and we heard another loud pop, we knew it was a gunshot," said Miriam St. Clair, a 58-year-old biology professor.

St. Clair said she looked out the window and saw students running outside. The professor then told her students to get inside the classroom and they closed the door, which did not have a lock. They barricaded themselves inside by piling 20 desks against the door, crouching behind other desks when they were done.

One of the students called 911 and the operator told them there had been an incident and to stay where they were. About 2 1/2 hours later, a SWAT team came in and told them it was safe.

"We were very frightened," she said.

More than two hours after the shooting, student Christian Dorn told WRC-TV by telephone that she was still barricaded inside a classroom. She recalled hearing two loud shots in the building and screams to call 911.

"I just thought about Virginia Tech and Columbine and just was praying this was not another one of those situations," she told the television station. "We're just confused right now. We're ready to leave."

By Tuesday night, several police cars and officers were still standing at the entrance to the college, which is in a suburban area across the street from a high school.

The Woodbridge campus is one of six in the Northern Virginia Community College system, which is the largest educational institution in the state. The system enrolls more than 60,000 students, according to its Web site.