Del. Joseline Peña-Melnyk (D) (Evelyn Hockstein/For The Washington Post)

Maryland progressives are ready to declare war on some members of the Democratic establishment after the defeat of two controversial bills during the legislative session in Annapolis and a bitter battle over whether to revive cash bail for poor defendants.

Left-leaning advocacy groups say they are planning to hold centrist Democrats who disappointed them accountable, with some activists — and at least one lawmaker — talking about trying to unseat longtime incumbents.

Although Democrats won victories on many fronts this year, including paid sick leave, a fracking ban and limits on state funds for charter schools and voucher programs, they failed to pass major bills aimed at protecting undocumented immigrants and ensuring racially diverse business ownership in the state’s nascent medical marijuana industry.

Additionally, advocates and members of the powerful Legislative Black Caucus say they felt betrayed by top Democrats who pushed — unsuccessfully — to revive the state’s bail program after Maryland’s highest court instructed judges not to set bonds that are too high for poor defendants to pay.

Larry Stafford, executive director of Progressive Maryland, says those issues loom large ahead of the 2018 elections, when Democrats hope to unite in opposition to President Trump and defeat popular Republican Gov. Larry Hogan.

Sen. Bobby Zirkin (D-Baltimore County) (Bill O'Leary/The Washington Post)

“The leadership of the party has fallen out of touch with the rank and file, particularly the minorities and progressives who make up the base of the party,” Stafford said. “People are angry at Trump, but also at Democrats for not stepping up to the plate.”

Several lawmakers have voiced similar frustration, including Del. Cheryl D. Glenn (D-Baltimore), who chairs the Black Caucus, and Del. Joseline A. Peña-Melnyk (D-Prince George’s), an outspoken member of the Latino Caucus who has called for voters to oust a senior Democratic senator in next year’s primary.

“It was my first session where I felt no sense of celebration,” Glenn said. “You’d think in 2017 that we would be further along than we are in the state of Maryland as it relates to people of color.”

Senate President Thomas V. Mike Miller Jr. (D-Calvert) played down the notion of a divide among Democrats, saying that “there’s not a split in the party.”

He also defended the various legislative outcomes, saying, for example, that many Democrats believed passing the immigrant-protection bill — which was denounced by the Trump administration — would have jeopardized the state’s chances of landing the new FBI headquarters and other federal plums.

Maryland Democratic Party spokesman Bryan Lesswing said party is “seeing more grass-roots energy and more Marylanders than ever before who want to get involved in political action and our Democratic Party.”

At the same time, some labor unions are criticizing Democrats for not passing legislation to allow collective bargaining for community college employees, among other things.

“This should be the year that we’re passing good ideas so voters know why they should be motivated to go out to the polls and vote for Democrats,” said Mark McLaurin, political director of the Service Employees International Union’s Local 500.

Progressive groups have begun identifying centrist Democrats they might want to challenge in the June 2018 primary, including Sens. Robert A. Zirkin, James Brochin and Katherine A. Klausmeier of Baltimore County, and Prince George’s Dels. Dereck E. Davis and Del. Joseph F. Vallario Jr.

Brochin is considering a run for county executive in 2018.

Incumbents have built-in advantages, including name recognition, established fundraising operations and strong backing from party leadership. But analysts said they could still be vulnerable, especially given the political climate.

“It’s very difficult to mount a challenge, but if you have enough anger and enough passion, we’ve seen that you can raise a tremendous amount of money and surprise the political system,” said Todd Eberly, who teaches political science at St. Mary’s College.

At the same time, he cautioned that progressive candidates might be too extreme to win a general election, especially in moderate districts where Hogan has strong support. “In the name of ideological purity, they may be creating a situation where Republicans can be more competitive in places they haven’t been able to win,” Eberly said.

Progressive Maryland is preparing to back a slate of candidates for state and local races, gathering donations and hosting recruitment events. A “candidate pipeline” session in Montgomery County in March drew about 40 participants. Similar events are planned for Prince George’s and Howard counties in coming weeks.

Stafford said the organization’s leaders will meet soon to begin sorting out which legislative seats to target, based on incumbents’ voting records, their vulnerability to primary defeat, and the availability of candidates who could realistically challenge them.

Other liberal groups plan to publish report cards on lawmakers, similar to what the National Rifle Association does for voters concerned about gun rights.

McLaurin, whose union helped defeat four Democratic incumbents in 2010 amid battles over the minimum wage, same-sex marriage and abolishing the death penalty, said the goal in 2018 is to “move the center of gravity in the caucuses left, no question about it.”

The incumbents defeated in 2010 were Nathaniel Exum and David C. Harrington in Prince George’s County, Rona E. Kramer in Montgomery County and George W. Della in Baltimore. McLaurin said SEIU Local 500 sent dozens of its members into those legislators’ districts to work against them and plans to repeat that strategy this cycle.

Kimberley Propeack, director of the immigrant rights group CASA in Action, said her organization will target “Democrats who have blocked progressive advances in the House and Senate.”

CASA is among the groups raising questions about Zirkin, who chairs the powerful Senate Judicial Proceedings Committee. The lawmaker helped pass a ban on fracking, legislation that was embraced by progressives. But he also voted against the paid-sick-leave bill and supported the pro-bail bill, which passed out of his committee and was approved by the Senate but died in the House of Delegates.

Zirkin’s committee rejected the Trust Act, which passed the House and would have limited police cooperation with federal immigration-enforcement efforts. The Senate committee advanced a watered-down alternative that stalled without a vote on the last day of the legislative session.

At a news conference that day, Peña-Melnyk called on Zirkin’s constituents to vote him out of office — an extraordinary breach of the typical code of public conduct among lawmakers in Annapolis.

Zirkin said his committee was doing its best to balance civil liberties with public safety. “Compromise is not a dirty word, it’s the way toward progress,” he said. “I categorically reject this new era of hyperpartisanship that seems to have replaced rational debate.”

Propeack said Miller — who declared, after White House criticism of the Trust Act, that “Maryland is not going to become a sanctuary state” — bore the most responsibility for the bill’s demise.

“He used language that was seemingly drawn from Trump’s talking points,” Propeack said. “For the entire Democratic body politic, it was just hurtful.”

Miller, the longest-serving state Senate president in the country, ran unopposed in the 2014 Democratic primary and won that year’s general election with 62.5 percent of the vote against Republican Jesse Allen Peed.

Zirkin was unopposed in both the primary and general election that year.

Some progressive groups have mentioned Del. Shelly L. Hettleman (D-Baltimore County) as a potential challenger to Zirkin next year. The first-term lawmaker, who co-sponsored many progressive bills during the session, declined to comment on whether she is considering a Senate run.

Mileah Kromer, a political science professor at Goucher College, said Democrats must figure out whether they faltered in the past national election because they “didn’t go progressive enough or because they lost sight of what is important to voters — jobs and the economy.”

She said even if progressives are unsuccessful in removing incumbents, their fervor and frustration “could shake up the leadership.”

This story has been edited since its initial publication.