Maryland Attorney General Brian E. Frosh must have slept through his law school class on the roots of the American criminal justice system.

Frosh thinks, according to a letter his office released , that cash bail — the system of arraigned defendants putting up money to secure their pretrial release — is likely unconstitutional if the defendants cannot afford it.

Nothing could be further from the truth.

Frosh rests his assertion on the Eighth Amendment to the Constitution, which states clearly, “Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted.”

In fact, bail is specifically allowed for by the constitutional clause that Frosh oddly suggests outlaws the practice. The key is the term “excessive” — used twice by the founders to delineate bail from extreme fines and burdens being imposed on innocent-until-proven-guilty defendants.

Bail has its roots in Anglo-Saxon and later medieval England, from which our own justice system is derived. To avoid the need for incarcerating all the accused, our forebears created a system that gave the accused an incentive to be available to face justice.

Because abuse of the bail system was a legitimate concern, the system was further codified and reformed in the Magna Carta, which accordingly took into account three criteria we still use today: whether the offense merited consideration of bail, the likelihood of conviction and the defendant’s criminal history.

Heinous crimes and inveterate offenders were, and often remain, ineligible for bail for good reason. If you are a threat to the public, likely to be convicted or simply a repeat criminal, you are less likely to stay and face your peers (or a judge) if you can avoid it.

These sensible reasons seem to matter not to Frosh who, alongside the Open Society Foundation and a veritable who’s-who of “social-justice” types, is clamoring for Maryland to eliminate cash bail because it hurts the poor.

On the contrary, cash bail is the great equalizer. Maryland’s court commissioners (who set bail) already take into consideration the severity of the crime and the defendant’s history and ability to pay and other relevant circumstances.

If a defendant has no means to pay, he or she is likely to have little else to stay for, either. Property (which can be used to seek bail bonds from third-party lenders) is an incentive for the accused to stay as much as cold, hard cash being bonded over to the state as security against a defendant skipping town.

Social connections and willingness to potentially sacrifice a loved one’s home are steep but fair incentives to the defendant to not hurt others further by becoming a fugitive. That also functions to keep offenders on the straight and narrow while out on bail because the lender of last resort (family) has a strong incentive to keep a close watch on the accused to ensure they keep their house, car or life savings intact.

Furthermore, the alternatives to cash bail are to hold people throughout trial (often months and years, depending on the case’s tortuous path) or to release them on their own recognizance — in other words: We trust you if you pinkie swear to show up for trial and likely punishment.

One analysis found that in Denver, 66 percent of accused heroin dealers failed to show up for their court dates when simply released without having to post bond.

The law already affords defendants the right to appeal an excessive bail amount and judges to determine the efficacy of ensuring a trial appearance.

The “alternatives” being proposed to money bail are foolish at best. An “individualized assessment” is already done by the sitting magistrate. These reforms would only give judges two bad options: release an offender who flees or hold unjustly the innocent in conditions that the social-justice do-gooders rightly deplore.

Now, there is already evidence Frosh and his kindred spirits are dangerously intimidating arraignment courts into releasing risky offenders onto the streets because they cannot jail them.

As the British statesman Lord Falkland observed, “When it is not necessary to change, it is necessary not to change.”

Minor reforms to cash bail may be necessary to improve public safety and trial appearance rates, but eliminating a tried-and-true practice is foolhardy and dangerous.

The writer is a visiting fellow at the Maryland Public Policy Institute.