This article was produced in partnership with The Capital, which is a member of the ProPublica Local Reporting Network, and the Southern Illinoisan, which was part of the network in 2018. ProPublica is a nonprofit newsroom that investigates abuses of power. Sign up to receive our biggest stories as soon as they’re published.

BALTIMORE — President Donald Trump launched a multiday Twitter tirade last month directed at U.S. Rep. Elijah Cummings, sharing video footage of derelict Baltimore neighborhoods and asking why the Democratic congressman wasn’t doing more to address the “disgusting, rat and rodent infested mess” in his district.

Though Trump didn’t say so, some of the responsibility for any such conditions rests with his own administration. The U.S. Department of Housing and Urban Development has ultimate oversight of nearly 35,000 public housing and federally subsidized rental units in the city, many of which suffer from the squalor the president decried on social media. HUD has known for years of failing conditions in many of them but hasn’t taken steps to ramp up oversight as it has done in other regions, such as New York City.

“I’m afraid,” said Rochell Barksdale, sitting in her living room at McCulloh Homes, a public housing property that failed an inspection in March. Barksdale has asthma and other health issues exacerbated by mold. She’s allergic to roaches, which she now has in her kitchen.

Get Our Top Investigations Subscribe to the Big Story newsletter.

“This is trauma,” she said, “living in public housing.”

HUD routinely inspects buildings like McCulloh Homes, where Barksdale has lived since 1999. The complex, owned and managed by the Housing Authority of Baltimore City, failed four of its last five inspections.

The poor conditions in Baltimore’s public housing complexes predate the Trump administration, but they remain among the worst in the nation, according to an analysis of federal data, alongside housing in Gary, Indiana, and East St. Louis, Illinois. (Check inspection scores for subsidized housing complexes near you using ProPublica’s HUD Inspect tool.)

Despite improving scores, nearly half of Baltimore public housing developments failed their last inspection. Several properties — including J. Van Story Branch Senior Apartments, Rosemont Dukeland and McCulloh Homes — have failed repeatedly. Of the 10 largest public housing authorities nationwide, Baltimore has the worst failure rate.

The housing authority did not respond to interview requests for this story, but it noted in a 2018 report that it needs a staggering $800 million to repair roofs, upgrade interior units and fund other big-ticket capital improvements in Baltimore.

In a March letter to city Councilman John T. Bullock, the housing authority’s executive director, Janet Abrahams, highlighted rising inspection scores, improved security and a new pest control program targeting rats. The housing authority also has noted in recent annual plans that it has partnered with private developers to improve conditions in some older buildings or replace them. Last year, HUD awarded the authority $35 million in grants beyond its typical funding to assist in that effort.

Like other housing authorities across the country, Baltimore’s is grappling with aging buildings and limited resources to improve them after decades of congressional cuts that have spanned Republican and Democratic administrations. The housing authority has lost more than half its public housing stock since the 1990s, and thousands of people are on waitlists seeking housing assistance.

Charles Thomas, 68, lives in Gilmor Homes, a public housing complex where nearly all residents are black, in the Sandtown-Winchester neighborhood.

It’s the same neighborhood where police arrested Freddie Gray, a 25-year-old who died from injuries he suffered while shackled in the back of a police van in 2015. Gray’s death sparked protests alleging police brutality and racist policies that marginalized black residents since the early 20th century.

After failing inspection in 2018, Gilmor passed this year. The improvement in the numbers doesn’t translate for many residents. An inspector working on behalf of HUD photographed broken doors and windows at Gilmor Homes, trash and large ruts in the yard where stormwater collects, according to HUD’s online database of inspection pictures.

For the last five years or so, Thomas has resigned himself to cold winters because of spotty radiators that don’t heat his home. Instead, he uses his oven, despite the risk of carbon monoxide poisoning.

“You bundle up,” he said. “Rats live better.”

Trump’s comments came as Cummings, who is chairman of the House Oversight Committee, stepped up his criticism of the Trump administration over conditions at migrant detention centers on the U.S. border. Cummings’ district encompasses most of West Baltimore but also includes parts of suburban Baltimore and Howard counties.

The president’s tweets were widely condemned in Baltimore as racist and cruel for calling the majority black city “dangerous” and “filthy,” drawing scrutiny to a city without offering a plan to help.

A few days later, HUD Secretary Ben Carson traveled to Baltimore, where he lived during his years at Johns Hopkins Hospital and where he cemented his role as a world-renowned neurosurgeon.

The secretary decried the “animosity” that keeps people from working together.

As a doctor, Carson said he worried about sending young patients back to blighted homes with vermin, lead paint and mold, where their health could worsen. As HUD secretary, he said he has championed programs that allow public housing administrations to partner with private companies to rehabilitate blighted buildings and improve residents’ quality of life.

One program, Rental Assistance Demonstration, has attracted applications from buildings across the greater Baltimore region. Referred to as RAD, the program allows housing authorities to convert their buildings from traditional public housing to those supported by rental vouchers or project-based rental assistance. That, in turn, allows them to borrow funds to make repairs, or partner with private developers to seek federal low-income housing tax credits or other state and local grants.

The Baltimore housing authority has already converted or is exploring possible conversions at more than 20 properties citywide, but in its 2019 annual plan to HUD, it reported issues with financing a conversion at two developments.

To the south, the Housing Authority of the City of Annapolis will convert one of its oldest and most troubled properties, Newtowne 20, under the program. HACA recently chose a partner to convert a second property, Morris H. Blum Senior Apartments.

But conversion is never a sure bet. Last year, the Annapolis authority failed to win lucrative tax credits for Newtowne 20 and was forced to cobble together the funding through a patchwork of state and federal funding programs.

Read More HUD’s Inspection System Gets a Poor Grade in Congressional Watchdog’s Report The Government Accountability Office’s findings mirror those of an investigation by The Southern Illinoisan and ProPublica, which documented numerous cases in which substandard housing complexes received passing — and even glowing — scores from HUD.

Proponents of RAD, including developers, say it is flexible and responsive to community needs, but critics say there’s less accountability when problems arise.

In Baltimore last week and at other stops across the country, Carson also touted “opportunity zones” as a big part of the solution for building new affordable housing. These zones are tax-incentive districts created by the tax reform law Trump signed in December 2017. Supporters say they are designed to encourage investment in distressed places.

But experts say most activity is being directed into gentrifying areas that are already slated for development.

There’s little evidence that what’s going up in these zones is helping to close the wealth gap between black and white citizens, said Andre Perry, a fellow at the Brookings Institution who has extensively studied the disinvestment in majority African American cities.

“I think that Ben Carson is listening to the private industry and not everyday people who live in these communities, including black and brown business owners,” Perry said.

Efforts to eviscerate federal blight-fighting and affordable housing programs have been underway for years. The Trump administration has sought to slash rental subsidies as well as programs that fund public housing repairs, build new affordable housing and improve municipal infrastructure systems. But members of Congress have pushed back and housing authorities have actually received more funding during Trump’s presidency.

Lost in the president’s Twitter missives is that Baltimore, in more recent history, has been at the forefront of attempts to unwind deeply rooted patterns of housing segregation that have led to poverty, disinvestment and despair.

For instance, Baltimore led the way in implementing a program created in the 1990s that sought to reduce concentrated poverty by replacing sprawling public housing complexes and high-rises with less dense, mixed-income developments.

Then tenants filed a lawsuit in 1995 against HUD, Baltimore and its housing authority, claiming they had violated the Fair Housing Act by concentrating African American public housing residents in poor neighborhoods with few resources. The parties settled, and in 2015, the Baltimore Regional Housing Partnership began overseeing a program to counsel residents and help them choose new places to live. That mobility program has helped some 5,000 families move, said Adria Crutchfield, the partnership’s executive director.

But the fact that so many problems remain underscores how deeply entrenched they are.

While some federally subsidized buildings owned by private or nonprofit landlords have garnered higher scores, residents report similar issues at many of them: persistent mold, rodent and cockroach infestations, plumbing leaks and safety concerns.

Tiffany Ralph, 47, walked around her apartment in Bolton House, a high-rise apartment complex in northwest Baltimore, pointing to sticky traps and holes plugged with steel wool. She’s used Brillo pads and caulk to close up holes and stop mice and rats from getting in.

In the course of fixing a mysterious leak in her bathroom last fall, a plumber left a gaping hole in the drywall behind her toilet, allowing roaches and rodents to invade Ralph’s apartment. She closed the door for the night and sealed it off using painter’s tape. All night, she lay awake listening to mice skitter and stick to the tape, trying to get in.

An inspector from Baltimore City eventually determined a corroded pipe was leaking raw sewage into Ralph’s bathroom.

Bolton House last scored 95 out of 100, a high rating.

“The best way to put it would be horrible,” Ralph said of the conditions in her building. “We have seen … our environment within the building take a rapid nosedive, and it’s been horrible.”

Edgewood Management oversees the building. Executive Vice President Michael Leithead, through a spokeswoman, said the company is committed to a “safe, healthy and affordable community at Bolton House.”

Separately, in 2017, investigations by ProPublica and by The Baltimore Sun examined conditions for tenants in Baltimore area rental complexes owned by a real estate company of the president’s son-in-law, Jared Kushner. The investigations found properties in disrepair and whose owners often sued residents who fell behind in rent. Some of those tenants use federal vouchers to help pay their rent. (Those properties are not subject to the same inspections.)

HUD officials acknowledge housing authorities have had to do more with less, while aging housing stock declines.

Brian Sullivan, an agency spokesman, said HUD is in the middle of revamping its inspection process, which has become an ineffective measure of safe and healthy housing. After 20 years, some landlords are maintaining properties to pass the test, addressing cosmetic issues while leaving underlying problems unchecked.

Trump, in his tweets, said that if Cummings spent more time in Baltimore, “maybe he could help clean up this very dangerous & filthy place.” But advocates say both Congress and presidential administrations have a responsibility to address the deplorable conditions in public housing.

Gregory Countess, an attorney with Maryland Legal Aid, has worked with public housing residents in the city for years. He said he sees a system that, year after year, reduces the amount of money available to fix housing that only gets older.

“Not only is it just a failure in the sense of leadership of these agencies, it’s a failure that is really an indictment of the federal government — both Congress and the administration — in the role that they’re taking.

“If they thought it was really important, they would treat it that way.”