David Garrett returned home from war to find he had no home. A disabled veteran from Maine who had served in Iraq and Afghanistan, Garrett soon fell into homelessness. After almost a year of camping out, he found an apartment he could afford by negotiating a deal in which he paid lower rent in exchange for paying four months in advance. When his landlord sold the building, the new owner said he found no evidence of Garrett’s prepaid rent and tried to evict him. Facing homelessness once more, Garrett needed a housing solution. But to get one, he urgently needed something else: a lawyer.

With nearly 50,000 veterans sleeping on the streets each night, it’s clear we are failing to serve those who have served our country. But the solution isn’t as obvious as it might seem. Veterans don’t need simply more doctors and shelter beds; new research shows that veterans need lawyers to fight on their behalf as well.

According to a new study from the Department of Veterans Affairs, at least five out of the top 10 problems leading to homelessness among veterans cannot be solved without legal help. The study surveyed more than 6,000 homeless veterans and service providers, asking them what services veterans need to become stably housed. The survey found that many veterans are able to secure food, medical services and substance-abuse treatment. But for problems that require legal assistance such as fighting evictions, upgrading military discharge status or restoring a driver’s license, many veterans are not receiving the help they need. Legal assistance is often critical to ensure that veterans find justice and get the benefits they have earned – and can keep a roof over their heads.

Securing benefits and services can involve a byzantine maze of procedures that many cannot navigate on their own. Even something that sounds simple, such as restoring a driver’s license that expired during service – essential for applying for much-needed resources that can keep veterans off the streets – may require the help of a lawyer, particularly if the veteran has other unresolved legal issues.

Given these realities, legal help is as much a necessity as housing and health care. Civil legal aid – legal representation in civil cases for people who can’t afford a private attorney – has proven effective in keeping veterans in their homes. As Garrett was facing homelessness, a civil legal-aid group called Pine Tree Legal Assistance stepped in. Pine Tree runs a program to support veterans with housing challenges and took Garrett’s case on the day of his eviction hearing. Pine Tree’s lawyers successfully negotiated an agreement with the new owner to prevent his eviction, secured federal funds through a partner nonprofit to help him pay rent and worked to help him obtain a Section 8 housing voucher. Garrett’s eviction case was dismissed, and he has been able to stay in his home.

Increasingly, VA health care teams are acknowledging the role legal needs play in shaping veterans’ health and well-being and are embedding civil legal-aid lawyers in their teams. At these medical-legal partnerships, doctors, social workers and nurses work in tandem with civil legal-aid attorneys to identify and resolve problems at the root of homelessness so they can keep veterans healthy and housed.

Nationwide, VA-based medical-legal partnerships are helping people like Randall Barry, a nine-year Air Force veteran. Barry received numerous awards early in his service in his final deployment began experiencing debilitating symptoms of bipolar disorder. He saw a psychologist in the Air Force but was never formally diagnosed. After his 1989 discharge, Barry struggled to find work as his mental-health symptoms persisted. Without an official diagnosis, the VA denied his application for disability compensation. With no job and no benefits, he became homeless in 2008.

Barry connected with the Homeless Veterans Project of the Los Angeles-based Inner City Law Center, a medical-legal partnership that provides health care, case management and legal services to chronically homeless veterans who are high-need, high users of emergency health services. HVP attorneys worked with the VA’s Homeless Patient Aligned Care Teams to connect Barry with transitional housing and a psychiatrist who diagnosed and treated his bipolar disorder. With a diagnosis in hand, the partnership’s lawyers then helped Barry secure the benefits he deserved through a successful disabilities claim but was long denied.

As he celebrates his 57th birthday, Barry is both stably housed and financially secure for the first time in decades. Barry is one of the hundreds of veterans the medical-legal partnership has assisted since it launched in September 2013. In the last year alone, the partnership recovered nearly $1 million in benefits for veterans – an average of nearly $8,000 in increased income per veteran.

Leon Copeland, a homeless Vietnam-era Army veteran from Connecticut, also needed legal assistance. He lost his state-issued identification, so he was unable to obtain disability benefits to help him afford a home, and untreated schizophrenia made stability of any kind all but impossible. The VA’s Errera Community Care Center connected him with the Connecticut Veterans Legal Center, a civil legal-aid group that represents veterans in a wide array of legal problems. The Errera community center helped him manage his schizophrenia while the legal center worked to get him a new birth certificate and driver’s license this year. Today, with the monthly Social Security disability payments he receives, Copeland is stably housed and still engaged in VA health care.

Emerging partnerships between civil legal-aid and community health and housing organizations can permanently transform veterans’ lives but require investment to meet the need. Most partnerships struggle to leverage existing, scarce legal-aid resources, alongside private philanthropy. The Department of Veterans Affairs has taken steps to raise awareness of legal needs and solutions. Congress can help by passing the veterans omnibus bill, section 608 of which would authorize the VA to provide funding to organizations that provide civil legal services to veterans who are homeless or at risk of becoming homeless.

Medical-legal partnerships and other civil legal-aid interventions for veterans show the promise of a holistic approach to veterans care. It’s time to make the investments we must to ensure we don’t leave any veterans behind.