A woman slit her wrists Thursday morning inside a Brooklyn courthouse after a judge permanently tossed her civil case, witnesses told The Post .

Dina Semacaritt was sitting on the benches in the hallway on the fifth floor of the Brooklyn civil courthouse ​on Adams Street ​when she collapsed in what appeared to be a faint, according to a courthouse source.

Yet when court officers rushed to her aid, they noticed blood seeping out from under her.

Brooklyn Civil Supreme Court Justice Johnny Lee Baynes had just thrown out Semacaritt’s 2016 suit against Astoria Federal Savings Bank​ ​–​ ​which she’d filed after​ the bank foreclosed on her home in 2010.

It was not immediately clear what the woman used to ​slash her wrists, given that the 52-year-old would have had to pass through metal detectors to enter the courthouse.

​​

Baynes’ clerk called 911, and she was transported to a nearby hospital along with her shell-shocked husband, Marcus Semacaritt.

Her condition was not immediately clear.

“It’s the most tragic turn of events for a case that should have ended today with the plaintiff by my side,” her attorney, a still-shaken Jonathan Rosenberg said. “It’s really sad.”