A man killed two people, including a law enforcement officer who was serving him an eviction notice at a home near Texas A&M University, on Monday before police fatally shot the suspect in a gun battle that lasted half an hour, officials said.
Four people also were injured, police and city officials in College Station said. The shooting comes at a time of national concern over gun violence after two recent mass shootings.
The dead officer was identified as Brazos County Constable Brian Bachmann, said Scott McCollum, assistant chief of the police department in College Station.
McCollum said Bachmann, 41, was shot in front of the house, about two blocks from the Texas A&M campus, and was pronounced dead at a hospital.
Police identified the gunman as Thomas Caffall, 35, and the bystander killed as Chris Northcliff, 43, of College Station.
College Station city spokesman Jay Socol said authorities were still investigating Caffall's background. It was unclear whether Caffall was renting the home or was being evicted for nonpayment of a mortgage, he said.
Officials said the wounded included a 55-year-old woman, who underwent surgery, and College Station police officer Justin Oehlke, who was in stable condition after being shot in the leg.
Officers Brad Smith and Phil Dorsett were injured by what police called gun shrapnel. Smith was treated at a hospital and released and Dorsett was treated at the scene.
"We had officers respond to a 'shots fired' call," McCollum said at a news conference. "Once the officers arrived, they began to trade fire. The officers defended themselves and called in additional officers."
College Station police officers shot and killed the gunman, said Jason James, a sergeant with the police department in nearby Bryan, Texas.
A Facebook page listed as belonging to Caffall, which had a photo nearly identical to a driver's license picture released by authorities, included photographs of rifles he had said he had acquired, including a Czech vz 58 assault rifle.
The university issued a "code maroon" shortly after noon, warning students and employees that an "active shooter" was in the area west of campus and asking them to stay away.
A university spokesman said he was unaware if any of the victims were students.
The College Station shooting comes less than four weeks after a man opened fire in a crowded Colorado movie theater during a midnight showing of "The Dark Knight Rises," killing 12 people and wounded 58 others.
On Aug 5 a gunman killed six people at a Sikh temple in Wisconsin before committing suicide.
Republican presidential candidate Mitt Romney said Monday at a Miami news conference that there should be no change to current gun laws.
"We've now had apparently ... three of these tragedies in a row and I happen to believe this is not a matter of the weapon that is used," Romney said. "It's a matter of the individuals, the choices these people make and we have to understand those kinds of choices from being made."