Correction: Because of incorrect information provided by the Montgomery County Executive’s office, an earlier version of this story inaccurately reported the amount of money the county has so far spent or committed to the Purple Line. The correct amount is $177.6 million. This version has been corrected.

Work is seen on a Purple Line station tunnel under a new library last month in Silver Spring, Md. (Bill O'Leary/The Washington Post)

Maryland Gov. Larry Hogan (R) gave tentative approval Thursday to a slimmed-down version of the Purple Line, setting aside his own long-standing skepticism of costly transit projects to support a 16-mile light-rail line that backers say will rejuvenate inner-suburban neighborhoods in Montgomery and Prince George’s counties.

The announcement marked a major shift for a staunch fiscal conservative who strongly opposed the Purple Line as too costly when he campaigned for governor last year. But he also showed he had not forgotten his conservative political base: Hogan simultaneously announced that he would not go forward with the Red Line light-rail project in Baltimore, which he suggested was a “wasteful boondoggle.”

He also said he would increase spending on roads and bridges by $1.35 billion in coming years, and he emphasized that laying highway asphalt, rather than transit rail, remained “our top transportation priority.”

Hogan’s approval of the Purple Line came with conditions, especially a requirement that Montgomery and Prince George’s pick up more of the cost. They already have committed to spend more than $300 million on the project in the expectation that it would provide a badly needed, east-west transit link that would promote development and attract jobs.

Montgomery signaled quickly that it was ready to contribute more to get the project built. Prince George’s, which is less flush, was more guarded, saying the county has already pledged a significant amount to the project.

“I’m very positive that we can work all of those details out,” said Montgomery County Executive Isiah “Ike” Leggett (D).

Hogan’s support also appeared to depend on finding substantial additional savings in negotiations with companies bidding to construct the line as part of a public-private partnership.

The governor, who wore a purple tie for the occasion, was converted partly because Transportation Secretary Pete Rahn found ways for the state to reduce its share of the original $2.45 billion cost.

Maryland will save money by running trains less often and eliminating one of two planned staging areas for rail cars, for instance. Altogether, Hogan said his administration found ways to reduce the state’s share of the cost from close to $700 million to $168 million.

“We are not opposed to mass transit, but we do oppose wasteful and irresponsible spending on poorly conceived projects,” Hogan said.

Maryland Governor Larry Hogan (R) announced Thursday that he will move forward with the construction of the Purple Line as long as Prince George's and Montgomery counties paid most of the cost, among other stipulations. (WUSA9)

The line would still have 21 stations and run from Bethesda in Montgomery to New Carrollton in Prince George’s. It would pass through Silver Spring and the University of Maryland’s College Park campus. The Purple Line will connect to Amtrak and MARC commuter rail stations and will be the first rail line to directly connect spokes of a Metrorail system designed decades ago to carry commuters between the suburbs and downtown Washington.

Hogan also was influenced by Washington-area politicians and business leaders, who said the project was crucial to improving transit and encouraging growth inside the Beltway.

“The Purple Line is a long-term investment that will be an important economic driver for Maryland,” Hogan said. After expressing skepticism in the past about what he saw as overblown forecasts of how many jobs the project would create, he said construction alone would create 23,000 jobs in Maryland over the next six years.

The announcement came as a relief to many Purple Line advocates, who had feared that Hogan’s earlier comments signaled that he would cancel the project altogether.

“We’re thrilled,” said Purple Line Now’s executive director, Christine Scott. “I think what we’ve heard here is that the governor gets it. Jobs and connecting the counties are key, and he understands that, so we’re tickled.”

By contrast, some Republican lawmakers applauded Hogan’s investments in roads and bridges but expressed concern about the Purple Line’s long-term costs.

“Why should citizens in Harford County pay $100 million a year to maintain the Purple Line when you know someone from Bel Air is never going to ride it?” said House Minority Whip Kathy Szeliga (R-Baltimore County).

Hogan apparently sought to defuse criticism from conservatives by twinning the Purple Line announcement with the big increase in spending on roads and bridges, political observers said.

Hogan said the new roads money would include $200 million to improve the interchange between Interstate 95 and the Capital Beltway. It also will go to reducing congestion on Interstate 270 in Montgomery and Frederick counties, and widening Route 404 on the Eastern Shore, a major thoroughfare for summer beach traffic.

“We are making investments in every single county in the state,” Hogan said.

The new spending includes $845 million for major new highway and bridge construction projects. It includes new funds to resurface 2,000 miles of state roads and nearly $200 million to upgrade structurally deficient bridges.

The state also will go forward with $625 million in road projects already in the state Department of Transportation’s plans.

The total of nearly $2 billion in roads spending will be financed in part from savings from not building the Red Line and from lower costs for the Purple Line, according to Erin Henson, a spokeswoman for the Maryland Department of Transportation.

The twin investments in roads and the Purple Line were a “huge, win-win for Maryland,” said Richard Parsons, vice chairman of the Maryland Suburban Transportation Alliance. “This whole roads-versus-transit debate is archaic and pointless,” Parsons said. “We need more roads, and we need more transit. It’s not one or the other.”

But the decision against the Red Line drew sharp criticism in Baltimore. The thumbs-down was especially difficult because the line would have improved transit in some poor neighborhoods in West Baltimore where rioting broke out in April. “Although the governor has promised to support economic growth in Baltimore, he canceled a project that would have expanded economic development, created thousands of jobs [and] increased access to thousands more,” Mayor Stephanie Rawlings-Blake (D) said.

In rejecting the Red Line, Rahn said its “fatal flaw” was the need for a tunnel that would cost about $1 billion.

Hogan said one of his conditions for building the Purple Line was procuring $900 million in recommended federal aid for construction. The Federal Transit Administration has formally recommended granting the money, but it isn’t guaranteed.

A bigger question had to do with whether Montgomery and Prince George’s would ante up enough additional money to make the project possible.

Hogan declined to say how much more he expected them to contribute. But Leggett said he had recently had discussions with Rahn about kicking in up to $50 million on top of the $177.6 million the county has already committed. .

“My view is that if for this project to move forward, it will require an additional commitment from the county, I am prepared to sit down and discuss it,” Leggett said.

Prince George’s County Executive Rushern Baker (D) was more cautious. After thanking Hogan for “diligently evaluating” the project, he said Prince George’s “has already committed an extraordinary amount for a local government to contribute towards a state project.”

Prince George’s has budgeted $119 million for the Purple Line.

Baker said, “We will work in concert with Montgomery to analyze whether this new proposal . . . will lead to the outcomes and benefits we have been talking about for years.”

In addition, the state Transportation Department said a substantial amount of savings still had to be obtained from contractors vying for the project.

“Everything is dependent upon us working with the private sector to find out what they can build this project for,” said Henson, the transportation department spokeswoman. “We’d love to have the numbers, but we’re not there yet.”

It appeared that the two counties’ additional contributions, and savings from the private sector, would have to total about $300 million to meet the governor’s target for the state’s share.

Hogan’s predecessor, Martin O’Malley (D), made building the Purple Line one of the state’s top transportation priorities for eight years. But the project’s future — once considered a certainty in heavily Democratic Maryland — became tenuous in November, when Hogan upset his Democratic opponent, then-Lt. Gov. Anthony G. Brown.

The line will run two-car trains powered by overhead electrical lines mostly along local streets, except for a three-mile segment between Bethesda and Silver Spring. That portion will run along an extension of the wooded Capital Crescent Trail, where most of the trees must be cut to make way for tracks and a rebuilt cycling and walking trail.

In addition to the other possible roadblocks, a federal lawsuit has been filed by conservationists who say the Purple Line’s construction would violate environmental laws. And neighborhood groups along parts of the alignment say the state must do more to reduce train noise and help people cross the tracks safely.

Ovetta Wiggins, Arelis Hernandez, Katherine Shaver and Luz Lazo contributed to this report.