A home invasion suspect was killed Monday night while attempting to break into a southside apartment.

It happened at an apartment complex in the 6100 block of Wooldridge Road, near Cimarron Boulevard. Corpus Christi police said a preliminary investigation showed that a 41-year-old suspect who has not yet been identified tried breaking into an upstairs apartment. The tenant, fearing for his safety, shot the suspect.

The suspect was taken to the hospital where he later died. Meanwhile, an initial investigation shows that the tenant faces no charges thanks to Texas' castle doctrine.

Texas' castle doctrine, or castle law, protects you from legal troubles if you are ever placed in a situation where you have to use force or deadly force to protect yourself against an intruder who poses a threat.

"If they are forcefully attempting to enter your property or forcefully entering the place," said Daniel Garcia, manager of the Sharp Shooter gun store and indoor shooting range. Garcia said you have every right to defend yourself in your habitation.

"The castle doctrine is something Texas has in place so if anyone unlawfully enters your home or vehicle, especially forcefully, you have the right to use deadly force," Garcia said. "And the law is going to assume you had the right to do so."

Corpus Christi police said that so far, based on their investigation Monday night, the shooting appears to be a case of self-defense.

According to the Texas Department of Public Safety website, statistics for 2017 show that of all reported burglaries in the state, more than 63-percent occured at someone's home. However, the castle law goes further when it comes to protecting your life.

"The castle doc extends to your place of business where you are workin," Garcia said. "Your vehicle -- if you are sitting in your vehicle, someone is forcefully trying to enter your vehicle or remove you from your vehicle, you can use deadly force to defend yourself."

There is one thing to keep in mind, however.

"The castle doc does not allow you to get out of your vehicle and use deadly force against someone else who might be in a parking lot or something like that," Garcia said. "It only applies to you while sitting in your vehicle."

Garcia said as long as you feel threatened, that's the key.

"You will have to prove to a jury that any reasonable person would feel the same way," Garcia said. "If they are much larger than you, much stronger than you, or have some type of weapon, yeah, deadly force can be used."

The Sharp Shooter does offer a license to carry class every other Saturday. Garcia said that would allow you to carry your firearm with you and would extend your rights even further when faced with other types of scenarios.