The correct answer is: by preventing detention for a crime without evidence.

Why that option is right

A writ of habeas corpus is a court order that forces the authorities holding someone (like the police or a prison warden) to bring that person before a judge and justify the detention.

If the government cannot show a lawful reason or sufficient legal basis, the judge can order the person’s release.

In other words, it protects individual freedom by:

  • Requiring the government to explain why someone is being held.
  • Allowing a court to free a person who is detained unlawfully , such as where there is no valid legal cause or evidence supporting the detention.

That is exactly what “preventing detention for a crime without evidence” is getting at: the state cannot lock you up and then refuse to show any legal justification.

Why the other options are wrong

  • “By preventing arrest and detention” – Habeas corpus does not stop arrests from happening; it operates after someone has been detained, to test whether the detention is lawful.
  • “By providing a defense for committing a crime” – It does not excuse criminal behavior or serve as a defense like self‑defense or insanity; it only tests the legality of custody.
  • “By providing a way to avoid sentencing at trial” – It does not let someone skip trial or sentencing; it simply challenges whether their current imprisonment or detention is legally justified.

So, habeas corpus safeguards individual freedom by giving people a legal mechanism to challenge unlawful detention and demand that the government show a lawful, evidence‑based reason for holding them.

Information gathered from public forums or data available on the internet and portrayed here.