A Texas homeowner shot and killed three people who he said were trying to break into his trailer home, authorities said.

The homeowner was injured in the exchange of gunfire Monday and remained hospitalized, Harris County Sheriff Ed Gonzalez told reporters.

Ed Gonzalez, Harris County Sheriff, speaks to the media while on the scene where three males were confirmed dead after an apparent home invasion robbery attempt. @HCSOTexas

Gonzalez said the homeowner, who he did not identify, opened fire on the men with a shotgun after they entered the trailer in the Houston suburb of Channelview on Monday morning.

A witness told authorities that there may have been a fourth person who fled before the group entered the home, Gonzalez said. Investigators have not yet spoken to the person.

A man who identified himself as a cousin of the homeowner told NBC affiliate KPRC that his relative was shot in the leg and back. He spent Monday in surgery, Cesar Lopez said.

Officials said it was unclear why the men had targeted the home or what they wanted, but that a car that may have been theirs was left outside running.

They could have been “planning to break in and make a quick getaway,” Gonzalez said.