Passengers wait on the platform before boarding a train at the U Street Metro Station in Washington. (Pablo Martinez Monsivais/AP)

Maryland will give Metro its full share of $167 million a year in new, permanent funding, the governor and leaders of both legislative chambers said Thursday, putting the transit system on track to win a historic regional deal to support it.

Virginia and the District have committed to provide their share for a total of $500 million a year in the dedicated funding that Metro says it needs for capital investments to ensure safety and reliability.

With Maryland’s assent, and barring last-minute hitches, the system will receive a reliable revenue stream for the first time since its trains began rolling in 1976.

“This is terrific news for Metro customers, as well as the businesses and communities we serve,” Metro General Manager Paul J. Wiedefeld said.

“In the last two weeks, we have seen history made in the Greater Washington region” as jurisdictions have joined “to make an unprecedented commitment to our Metro system,” said MetroNow, a broad coalition of business, nonprofit and advocacy groups.

Maryland lawmakers had been moving gradually to hit the $167 million target that represents its portion under a Metro cost-sharing formula. The Democratic-dominated House originally considered a bill providing $125 million, and then lifted the figure to $150 million with agreement from Gov. Larry Hogan (R).

On Thursday afternoon, Senate President Thomas V. Mike Miller Jr. (D-Calvert) said his chamber would approve the full $167 million — and that plan was promptly endorsed by House Speaker Michael E. Busch (D-Anne Arundel) and Hogan.

“We’re very pleased to see those final details have been worked out in the legislature,” Hogan spokesman Doug Mayer said. “This has been a bipartisan effort from start to finish, and the governor looks forward to signing this into law as soon as possible.”

Miller’s comments were first reported by the website Maryland Matters and confirmed by spokesman Jake Weissmann.

“What the [Senate] president was saying was, ‘We’re going to pass a bill with $167 [million],’ ” Weissmann said.

Underlining the urgency, the Senate will hold a hearing on the bill Tuesday, two days earlier than originally scheduled, to get it to the full Senate by the end of the week.

“The president wants it on the floor as soon as possible,” Weissmann said.

Busch said he expected the House to agree to $167 million after the Senate acted.

In a related development, Metro got some good financial news from Capitol Hill: The omnibus federal spending bill moving through Congress includes a full $150 million annual appropriation for its capital spending for the current fiscal year. The White House has proposed cutting the subsidy to $120 million for the next fiscal year.

The appropriation for the next fiscal year, which begins in October, is the 10th and final installment in a 10-year funding program for Metro that the region hopes to extend. Even with the $500 million a year in new, dedicated funding now expected from the District, Maryland and Virginia, Metro says it needs to continue receiving the $150 million a year from the federal government.

Meanwhile, top elected officials in Northern Virginia agreed to ask Gov. Ralph Northam (D) to use more state money or raise local taxes to pay for that state’s Metro bill, instead of using so much funding earmarked mostly for road projects.

The leaders of Fairfax, Arlington and Loudoun counties and the city of Alexandria are pressing Northam to restore some or all of the $102 million a year that Northern Virginia would lose under Metro legislation passed this month by the General Assembly.

The officials, all Democrats, support the plan to provide Metro with $154 million a year in new, permanent funding if Maryland contributes $167 million and the District gives $178 million.

But the officials are dismayed at the bill’s higher-than-expected cost in giving Metro money that goes to widen roads, improve intersections and support transit projects in their severely congested suburbs. Northam has said he will propose amending the legislation to address Northern Virginia’s concerns.

The plan for the three jurisdictions to increase their support for Metro by a total of $500 million a year in dedicated funding was first proposed by Wiedefeld last April. He called then for a “new business model” for the transit agency, 17 months after he took over and launched changes including accelerated repairs, improved financial management and a campaign against absenteeism and excessive overtime.

The money — on top of what the three jurisdictions provide now — will help pay for a 10-year investment program totaling $15.5 billion. Metro says it will use the money to buy new rail cars and buses, upgrade track and power systems, modernize stations and make other improvements.

The cost is divided according to a formula based on factors including population, ridership and number of Metro stations in each jurisdiction.

Each of the three is raising the money in a different way. Maryland has planned to tap its state transportation trust fund, which will reduce the total available for road and bridge projects throughout the state.

Virginia is using a combination of state funds, an increase in regional wholesale gasoline taxes and the diversion of funds from Northern Virginia road and transit projects.

The District plans to rely in part on raising the sales tax, commercial property tax and tax on ride-hailing services such as Uber and Lyft.

The impetus to increase support for Metro followed a prolonged period in which the transit system suffered from unreliable service, fiscal mismanagement and chronic safety lapses, including the fatal Red Line crash at Fort Totten in 2009 that killed nine, and the L’Enfant Plaza smoke incident in 2015 that killed one rider.

Many of the problems arose from lack of oversight and poor management, but another contributing factor was decades of underinvestment and neglect.

Many urban transit agencies have struggled with shortages of funding for new equipment and maintenance, but Metro was unique in one respect: It is the only major subway system in the nation without a tax or other dedicated source of funding.

That meant the agency had to rely on annual appropriations from the District, Maryland and Virginia. Almost 10 years ago, the federal government also began providing subsidies, which required appropriations to be approved each year.

Without a dedicated source of funding, it was difficult for Metro to make long-term plans or count on adequate support. The lack of a dedicated revenue source was identified as a major weakness in the agency’s finances as early as the 1970s.

Government and private analyses and studies have repeatedlysaid the system needed dedicated funding, but efforts to provide it were always stymied. Part of the problem was the difficulty in getting three jurisdictions — each with a distinct legislative and administrative structure — to cooperate.

Nearly two years ago, elected officials, business groups and others in the region began a process of intense study and debate over how to address Metro’s problems. A large coalition of Metro supporters — spearheaded by business organizations but also including environmentalists, unions, grass-roots activists and other civic groups — came together to advocate for dedicated funding in both state capitals as well as the city.