A  policeman and another man were shot dead near a major US university before police shot the suspect and took him into custody, where he has reportedly died.

Assistant Police Chief Scott McCollum said on Monday three more police officers and a female civilian were wounded in the shooting, which took place in College Station near Texas A&M University, which has nearly 50,000 students.

McCollum said Constable Brian Bachmann had gone to a house a few blocks away from campus to serve an eviction notice when the suspect opened fire, leading the officer to call for backup before he succumbed to his wounds.

Reinforcements rushed to the scene after the first shots were fired and battled the gunman, eventually wounding him and taking him into custody, McCollum said at a press conference.

Local media later cited police as saying the suspect has died in custody. The police could not immediately be reached for comment.

McCollum said police were still looking into the motive behind the shooting and declined to provide details about the suspect’s identity, the firearm that was used or the circumstances behind the eviction notice.

“A situation like this is very chaotic. We have a lot of information that’s coming in, we have multiple crime scenes, and we ask the public to be patient as we try to understand why this tragedy has occurred,” he told reporters.

McCollum later said the civilian male shot dead in the incident was in his mid-60s and that the woman, 55, was in surgery.

One policeman was shot in the leg and taken to hospital, and two others suffered “non-life threatening injuries”, he said.

The incident came in the wake of two recent mass shootings – one in a crowded cinema in Colorado and another in a Sikh temple in Wisconsin – less than three weeks apart, that reignited debate over lax US gun laws.

The university issued a “Code Maroon” warning to students at 12.29pm local time (0329 on Tuesday AEST), and said the shooter was apprehended 15 minutes later. It urged students to “continue to avoid the area”.

The incident took place around the 200 block of Fidelity Drive, a residential area a few blocks from the sprawling Texas A&M campus.