ROCKFORD, Ill. (WTVO) — Cardiopulmonary resuscitation (CPR) is required to be taught in schools in 40 states.

A person never knows when they will need to jump into action to save another’s life. CPR is not a gentle act, however, and can lead to broken chests and other injuries when done correctly.

Many people would view these as small prices to pay for staying alive, but can a person get in trouble for saving a person’s life that might not have wanted to be saved?

In most cases, a person cannot be sued for performing CPR, according to CPR Certified, though this can be different on a state-by-state basis.

“Good Samaritan” laws exist in many states. These are in place to protect people from performing CPR, granting immunity from civil charges in most cases. They can be charged, however, if they performed CPR in an instance of willful misconduct or gross negligence.

In fact, some states actually required people that are CPR certified to step in if necessary. For example, Vermont residence that do not give “reasonable assistance” can face a fine of $1,000 or more.

Good Samaritan laws do not cover all medical procedures, however. If a person attempts an impromptu tracheotomy to save a choking victim when they have not been trained, it can be viewed as negligent or reckless. This could lead to a person being sued.

Some people have conditions, though, that would make CPR dangerous to conduct. If that person has a Do Not Resuscitate (DNR) order, a person must avoid giving CPR even if they know how to use it.