It shouldn’t be painfully hard to obtain a divorce that the law says you’re entitled to. And it shouldn’t be that hard only if you’re poor.

Ending a marriage requires a lawsuit. To obtain a divorce, one spouse has to sue the other in court. If you’re rich, this isn’t a problem. You just hire a lawyer. But as the U.S. Supreme Court has recognized, divorce is just as fundamental to nonwealthy folks as it is to the Brad Pitts and Angelina Jolies of the world. And if you’re low-income, you probably won’t be able to hire a lawyer because they cost so much.

Being trapped in an unwanted marriage can be pretty awful. We define ourselves, and society defines us, by reference to our spouses. Marriage and divorce affect income, property, children, medical care, just about every aspect of life. You can’t marry someone new until you get out of a marriage you’re in.

So if you need a divorce and you’re low-income, you either must find a free lawyer to help, or you have to figure out how to do it on your own. How hard is it to do either?

At least here in Philadelphia, it’s way too hard. That’s the conclusion of a six-year study that the Access to Justice Lab at Harvard Law School, which I direct, recently completed. We partnered with Philadelphia VIP, an organization that matches low-income people with volunteer pro bono lawyers. The Philadelphia Family Court, showing a dedication to transparency rarely seen from a court system, volunteered dozens of hours of staff time to provide us redacted versions of critical documents.

From 2011 to 2013 (plus a three-year follow-up period), we compared two groups of low-income divorce-seekers: those who received an offer of a free lawyer by Philadelphia VIP and those who did not. We then looked at court records to see who had a divorce case on file within 18 months of entering the study and who had completed a divorce within 36 months.

The differences were huge. Those for whom Philadelphia VIP tried to find a free lawyer were nearly four times as likely — 54.1 percent versus 13.9 percent — to have a divorce case on record with the Philadelphia Family Court, and five times as likely — 45.9 percent versus 8.9 percent — to have received a divorce. And finding a free lawyer was rough: Philadelphia VIP was one of very few options for free divorce representation in the city, and during the study period, it had lawyers sufficient to find a matching attorney for only about 15 percent of eligible low-income folks who sought its help with divorces.

Why the huge differences? You might think they stemmed from a need for lawyers to handle thorny logistics, such as how to divide cars, houses, and pensions, or how to deal with child custody and financial support for children or a spouse. In that view, people with simpler cases not involving those factors can represent themselves easily enough in court. Not so. Most of the folks in our study were too poor to have any assets and income that would require complicated arrangements, and they still struggled to complete their divorces without legal aid. And as Pennsylvania residents, folks could use separate proceedings to address points like child support or custody. The huge disparities in access to divorce didn’t come from differences in our comparison groups either, since we used the randomized control method to ensure the groups were statistically the same before the VIP offer.

The answers became clearer when we dug into the procedures required for divorce in Philadelphia Family Court. Most of the processes come from statewide law, particularly the Pennsylvania Rules of Civil Procedure. Others were “imposed” by self-help materials that the Philadelphia Family Court referred people to. Some requirements were just extreme for nonlawyers to have to complete: filling out forms with obscure jargon, such as “Praecipe to Transmit the Record to the Prothonotary” or “In Forma Pauperis Petition,” figuring out which paperwork to file across multiple waiting periods, and using a typewriter — not a printer, not a pen, but a typewriter — to complete a form only available from the courthouse.

Marriage is a legal institution, so the state can and should have a role in facilitating it. But the way to regulate divorce isn’t by attaching it to an arcane legal system that requires a lawyer to navigate. These processes must change, across Philadelphia, Pennsylvania, and elsewhere.

D. James Greiner is the Honorable S. William Green Professor of Public Law at Harvard Law School.