TAMPA, Fla. (WFLA) — A home invasion suspect was killed and another was injured after a Pasco County resident fended them off Friday afternoon, according to deputies.

The Pasco Sheriff’s Office said about 2:10 p.m., three burglars attempted a break-in at a home in the area of Hickory Hill Drive.

However, the three suspects soon discovered the home was not empty when a resident inside the home began shooting at them, deputies said.

Two suspects were hit by the gunfire. According to the sheriff’s office, one died while the other fled to a hospital for treatment before being detained by law enforcement officers.

Deputies said the third suspect was detained later after a search of the area.

The shooting caused multiple schools nearby to go on controlled campus as a precautionary measure, including Fox Hollow Elementary, Jazz Dayspring Academy, and Schrader Elementary.