A gunman killed a police officer and another person on Thursday at Virginia Tech University, the site of one of the worst shooting rampages in U.S. history, school officials said.

The shooter fled on foot, and police - some in full combat gear - swarmed the campus in southern Virginia in a massive manhunt. Students and faculty were ordered to hunker down inside university buildings and dormitories.

The campus police officer was shot dead during a routine traffic stop in what news reports said was an exchange of gunfire. A second victim was found in a nearby parking lot, Virginia Tech said in a statement. Details were sketchy.

It was the first shooting at Virginia Tech since April 2007 when a mentally deranged student killed 32 people and wounded 25 others before committing suicide on the school's rural campus in the Shenandoah Valley roughly 250 miles from Washington, D.C.

The massacre was the deadliest attack by a single gunman in U.S. history.

Everyone has been directed to stay indoors, lock all exterior doors and stay away from the windows, school spokesman Dana Cruikshank said as students' parents frantically tried to locate their children by mobile phone and social networking sites.

Right now it's kind of scary and hectic around here that this is happening again, Matthew Spencer, a Virginia Tech freshman, told a local NBC station.

U.S. House of Representatives Republican Leader Eric Cantor of Virginia was among the first members of Congress to respond to the new shootings.

Such violence is never easy to explain, and cuts to our core - especially on a campus that has experienced such grief in the past, Cantor said.

The school, formally known as Virginia Polytechnic Institute and State University, was criticized for its slow response to the 2007 incident and has since put a campus-wide alert system in place.

The campus was locked down as the search for the gunman proceeded. Final exams set to begin on Friday for the fall semester were postponed.

Elizabeth Sullivan, a sophomore, said about 200 students were sent to the second floor of the Squires Student Center from the ground floor about an hour after the shooting.

Shortly after that, a SWAT team arrived to pat down each student and check every bag in the building.

I was pretty nervous at first. I didn't really know what was going on, Sullivan told a local NBC television station.

She said most students had been keeping in touch with their families through Facebook and Twitter.

The 2007 Virginia Tech massacre renewed a chorus of calls for tougher gun control laws, particularly in the U.S. Congress.

But these calls did not get far since Republican lawmakers have traditionally opposed gun control and Democrats, having been burned on the issue politically, did not push it.

Since taking office in January 2009, President Barack Obama has shied away from stiffer gun laws despite demands for it by members of his largely liberal base.