Traffic moves over the Memorial Bridge near the Lincoln Memorial in Washington. (Mark Wilson/Getty Images)

Despite recent investments in the District’s infrastructure, it continues to crumble — and in the worst state is the city’s transportation system.

A report card to be released Thursday by the American Society of Civil Engineers gives the city a C-minus, just above failing.

“We keep on falling behind gradually,” said Ranjit Sahai, a professional engineer with the consulting firm RAM in Northern Virginia, who chaired the report.

The District’s grade was pulled down by some of its biggest — and well-known — problems: an embattled transit system, congested roads and two levee systems in need of improvements to reduce the city’s flood risk.

The good news is the District fares slightly better than the nation as a whole, which received a D-plus. Still, its score isn’t something to be proud of.

“It basically says that it is in mediocre condition that requires attention,” Sahai said.

The city’s roads, for example, remain some of the most congested in the United States, causing drivers to sit idling in traffic, which causes roadways to become worn down. But to maintain city streets in even “fair” condition, the D.C. Department of Transportation needs four times its current maintenance budget, the ASCE concluded.

Last year, DDOT spent $25.3 million.

Keeping infrastructure in good repair isn’t cheap. A report last year by the Metropolitan Washington Council of Governments said the region needs $58 billion in yet-to-be identified funding over then next 15 years to keep its transportation, utility, safety and energy infrastructure in good shape.

That report, which focused on the entire Washington area, found a funding gap of $24.5 billion for transportation, including public transit, roads and bridges, and $20 billion for drinking-water supply and sewage treatment.

At the national level, an estimated investment of $3.6 trillion is needed to put all infrastructure in good working order.

“There really needs to be ongoing, year after year, investments,” said Stephen Walz, an official with the Council of Governments who co-authored its report.

“Part of the hole that we got ourselves in is that we were making insufficient investment in some of these areas, so it has decreased the serviceability, the reliability, the resilience in the systems,” he said.

In rating 11 areas of infrastructure, ASCE found a couple of bright spots for the city.

Its 265 bridges received a B-minus, in part due to the District’s recent undertaking of repairing critical infrastructure, with the goal of reducing by half the number of structurally deficient bridges.

The work included replacing the 16th Street Bridge over Military Road and improving the New York Avenue and 11th Street bridges.

With the $200 million investment in rebuilding the Virginia Avenue Tunnel in Southeast and other investments in the tracks used by freight and passenger trains, the city’s rail system received a grade of B-minus.

The District’s overall ranking is in line with Maryland’s, which was last graded in 2011, and Virginia’s, which was graded in 2015.

Maryland scored best for its maintenance of bridges but poor for managing storm water that flows into the Chesapeake Bay.

Virginia did best for its recycling efforts but ranked poor for its congested roadways — a problem shared with the District.

The District’s deteriorating transportation infrastructure is a concern for drivers and other road users. People who drive in the city collectively pay $311 million a year in extra vehicle repairs and operating costs —or $833 per motorist, according to ASCE.

An earlier report by ASCE found that 95 percent of the District’s major streets were in poor or mediocre condition. In 2014, DDOT said nearly 40 percent of all the roads were in poor or very poor condition, and a lack of funding has resulted in poor maintenance and slow response in road repairs.

DDOT said Wednesday that it welcomed ASCE’s assessment as “a valuable tool” in the city’s efforts to improve its infrastructure. Asked whether the city’s roads deserve a D-plus, spokesman Terry Owens said the agency is proud of its work maintaining city roads, tunnels and bridges.

“Are there challenges?” he said. “Yes.”

The transit system ranked lowest, getting a D. Metro’s financial woes and safety missteps, which prompted a federal takeover of safety oversight for its rail system, remain a concern for the agency and its riders, ASCE concluded.

Metro spokesman Dan Stessel said they agency didn’t know how the D rating was reached and was unaware of any analysis or inspections that the report’s authors might have conducted in the system.

“It is no surprise that years of underinvestment dating back more than a decade led to a significant backlog of deferred maintenance,” Stessel said, adding that the transit agency “has been working to bring the system to a healthy state, and that work continues to this day.”