Short answer. Not if the entry really was for that purpose. The article on trespass to dwelling states that it does not apply to a person who enters to prevent some serious harm to himself, the occupants or a third person, nor to one entering to render some service to humanity or justice.

What the law says

for the purpose of preventing some serious harm to himself, the occupants of the dwelling or a third person, nor shall it be applicable to any person who shall enter a dwelling for the purpose of rendering some service to humanity or justice

Revised Penal Code, Article 280 — Qualified Trespass To Dwelling. Read the full provision →

The exception is part of the article, not a plea outside it

Trespass to dwelling is committed by a private person who enters another's dwelling against the occupant's will. But the same article carves out entry for the purpose of preventing some serious harm to himself, the occupants of the dwelling or a third person, nor shall it be applicable to any person who shall enter a dwelling for the purpose of rendering some service to humanity or justice. That wording matters: the provisions of the article are not applicable at all. The entry is not a trespass that gets excused; it falls outside the offence, and the objection that the occupant did not want you there does not answer it.

Everything turns on the purpose at the moment of entry

The exception is written in terms of purpose, so it is judged by why you went in when you went in, not by what was found afterwards. Someone who entered on a genuine belief that a person inside was about to be seriously hurt is within the words even if the fear turned out to be mistaken. Conversely, a purpose formed after the fact does not retrofit. The qualifier serious also does work: an argument overheard, a suspicion that something is amiss, or concern about property is not the same as an apprehension of serious harm to a person.

It covers the entry and nothing more

This is the part people get wrong, sometimes badly. The article speaks about entering. It says nothing about what happens once you are inside, and it does not license breaking things, taking anything, or using force on anyone beyond what stopping the harm required. Each of those is its own matter under its own provisions. The safest reading is that the exception answers one question — whether entering was a crime — and leaves every other question about your conduct that evening exactly where it was.

Show what you knew before you went in

Because purpose is the issue, the useful evidence is whatever fixes what you perceived at the time: what you heard and when, calls or messages made before or during the entry, other people who heard the same thing, camera footage, and the state of the place when you arrived. Report the incident promptly rather than waiting to be accused, since a contemporaneous account is worth far more than one given weeks later. If a complaint has been filed, take that material to counsel before giving your own narrative of the night.

Related provisions

Note. Statute text quoted on this page is reproduced from the official enactment and is linked to the full provision. The explanation around it is general legal information from Vivas & Nobles Law Office, not legal advice. Whether it applies to your situation depends on facts only a lawyer reviewing them can assess.