Media playback is unsupported on your device Media caption Two killed in shooting near Texas campus

A gunman who shot and killed a police officer and a civilian near a Texas university has been identified.

Thomas Alton Caffal, 35, opened fire on Constable Brian Bachmann as the officer was serving an eviction notice. The shooting went on for half an hour.

The attack happened within two streets of Texas A&M University in the town of College Station on Monday.

Chris Northcliff, a town resident, died after being caught in the crossfire outside.

Caffal was also shot and killed. He was not a student at the university, but rented the home.

His sister told the Associated Press of her shock at the violence.

"We are just distraught by the havoc that he has caused," Courtney Clark said. In a separate statement, Caffal's mother said he had been "ill" and that "it breaks our hearts his illness led to this".

Pillar of community

Bachmann, a 19-year force veteran and married father of two, was shot in the chest. He is the sixth law enforcement official killed in Texas this year, according to the National Law Enforcement Officers Memorial Fund.

Barbara Holdsworth, who was helping to move her daughter, a student, was injured after bullets hit her vehicle, the Houston Chronicle reported. She was in critical condition on Tuesday.

Three other police officers were treated for injuries, police said.

Assistant chief of police Scott McCollum said in a news conference that officials would not speculate what led to the shooting.

"We're trying to make some sense of this," Chief McCollum said. He added that Bachmann's death was particularly devastating because he was "very close to everyone in law enforcement".

"He was a pillar in this community, and it's sad and tragic that we've lost him today," he said.

Caffal's neighbour, a former army medic, told the Houston Chronicle he started CPR on Bachmann after hearing shots.

"I was covered in his blood," Rigo Cisneros said, adding that the gunman repeatedly asked him to apologise on his behalf to the officer.

Texas Governor Rick Perry, who studied at Texas A&M University, said in a tweet: "Thoughts & prayers are with those impacted by shootings near A&M. Ever thankful for officers who daily sacrifice to keep us from harm."

Texas Attorney General Greg Abbott said in a statement: "Senseless attacks by violent criminals have no place in the state of Texas."

A Texas A&M University spokeswoman said most students were not on campus on Monday, as the autumn term does not begin until later this month.

Monday's shooting comes on the heels of an attack at a Sikh temple in Wisconsin that killed six people and a mass shooting at a cinema in Colorado in which 12 people died.

In the wake of the Wisconsin incident, President Barack Obama called for national "soul-searching" on the issue of gun violence.