Abstract
Necessary defense (noodweer) is a justification that may remove the unlawfulness of an act, including conduct that formally fulfills the elements of criminal assault. The legal problem arises when a person who resists an unlawful attack to protect themselves or another person is instead investigated and processed as a criminal offender. This study aims to analyze the application of necessary defense as a ground excluding punishment in assault offenses under the National Criminal Code and to analyze the authority of law enforcement officials to determine the existence of necessary defense under the latest Criminal Procedure Code. The study employs normative legal research using statutory, conceptual, and case approaches. Legal materials are analyzed qualitatively through a prescriptive method and deductive reasoning. The findings show that necessary defense under Article 34 of Law Number 1 of 2023 on the Criminal Code constitutes a justification when there is an immediate unlawful attack or threat of attack, the defensive act is directed at protecting a legally recognized interest, and the principles of proportionality and subsidiarity are satisfied. Its application must be assessed on a case-by-case basis by considering the concrete circumstances in which the attack occurred. Under Law Number 20 of 2025 on the Criminal Procedure Code, the assessment of necessary defense is not confined to judges but may be conducted sequentially by investigators, public prosecutors, and judges according to the stage of criminal proceedings. Investigators may terminate an investigation when the event does not constitute a criminal offense because a justification exists; public prosecutors may consider closing the case in the interest of law; and judges may render a judgment releasing the defendant from all legal charges. These powers must be exercised objectively, cautiously, transparently, and on the basis of evidence so as to protect persons who defend themselves without creating room for vigilantism.