This final ruling typically occurs after a court has adjudicated the merits of the case, when a party acts in bad faith, or when parties reach a full settlement. It effectively bars any future litigation regarding the same dispute. A judge grants a dismissal with prejudice when a case is permanently closed, prohibiting the plaintiff from refiling the same claim. This action can occur at any time during the proceeding.