SILVER SPRING, Md. — Their rock star had arrived.

As the sun set on a sticky June evening, hundreds of supporters screamed. They chanted his name. They tried to get close enough to touch him.

“You all ready to make a political revolution?” Sen. Bernie Sanders, I-Vt., asked them last week, fist pumping, voice booming. Then, for more than 15 minutes, he riffed on his familiar themes: “Medicare for All," tuition-free public college, a $15 minimum wage. Someone held a sign urging a 2020 presidential run.

Sanders, however, was not campaigning for himself. At least not explicitly.

Ahead of the Maryland primary on Tuesday, Sanders had made the short trip from Capitol Hill to this Washington suburb to campaign with Ben Jealous, a former leader of the NAACP and one of the state’s top Democratic candidates for governor. The rally was part of what Sanders and his allies say is a cross-country endorsement strategy intended to help spread his ideological message.

But the race in Maryland has also become a critical test of Sanders’ ability to sway elections. If his policy agenda has caught on widely among Democratic candidates, and succeeded in moving the party to the left, Sanders himself has struggled so far to expand his political base and propel his personal allies to victory in Democratic primaries.

He has endorsed only a handful of candidates in contested primaries, and three of them have recently lost difficult races in Iowa and Pennsylvania.

In addition, an advocacy organization aligned with Sanders, Our Revolution, has had only marginal success. Though it has touted its electoral victories in recent primaries, fewer than 50 percent of the more than 80 candidates it has endorsed have won elections this year.

Sanders and his advisers dismiss the importance of his win-loss record during primary season — “It’s not a baseball game,” he said — and say he is treating the midterms chiefly as an exercise in movement-building. Yet for a figure of his prominence, who may run for president a second time in 2020, the midterm elections could represent a significant missed opportunity if Sanders fails to usher any allies into high office.

At the moment, Jealous’ campaign in Maryland appears to be the best remaining chance for him to do so.

Sanders rejected the notion that the primary elections might reveal something about his political strength. “We endorse based on where we can have the most impact,” Sanders, 76, said in a brief phone interview after the Maryland rally. “What I don’t waste time on is endorsing people by and large who are clearly going to win.”

There are signs his progressive message is resonating. Democratic candidates are increasingly embracing his key proposal, “Medicare for All.” And like him, many now support tuition- or debt-free public college. There are widespread calls for a substantial increase in the minimum wage.

But Sanders has done relatively little to fortify the infrastructure he built out in the 2016 campaign, and Our Revolution appears to be flailing. The group has repeatedly picked fights with the Democratic establishment in primary elections, losing nearly every time, and there have been questions about its leadership. Sanders has appeared to distance himself from some of its endorsements, including its support for Dennis Kucinich, a former congressman with some fringe views, in his unsuccessful bid for governor of Ohio this spring. Even supporters of Sanders who are sympathetic to his overall approach to politics say that he has not capitalized on opportunities to build support in more conventional ways.

Early in the campaign season, for instance, several of Sanders’ advisers discussed creating a “super PAC” to intervene in congressional primaries and help elect a bloc of activist Democrats, according to three people familiar with the tentative proposal, who spoke on condition of anonymity to discuss private conversations. But Sanders was not interested in the idea and his allies ultimately feared it would alienate core supporters drawn to his perceived purity as a vocal opponent of super PACs.

Sanders has also seemed to prefer charting a separate course from the party leadership, holding rallies around the country that focus on specific issues — like health care or workers’ rights — without a direct link to elections nearby.

In one telling episode, Sanders rebuffed entreaties from multiple Democrats in California who asked him to consider holding a get-out-the-vote rally in the state before its June 5 primary. Sanders had plans to be in Anaheim, California, the weekend before the election for events highlighting labor issues, including at Disney.

But Sanders declined, citing his busy schedule on the trip, said two people familiar with the exchange, who were not authorized to discuss it on the record.

Ari Rabin-Havt, a senior adviser to Sanders involved in planning the California trip, said he was unaware of multiple requests for Sanders to help turn out the vote for candidates there.

Perhaps nowhere is Sanders’ party leadership role murkier, however, than in the way he has approached his endorsements — alone.

“It’s his choice,” said Rabin-Havt, a senior adviser to Sanders. “Every decision is his.”

Although some of the roughly 20 candidates he has endorsed do overlap with contenders whom other Democratic and progressive organizations have supported — including Stacey Abrams, an anointed party favorite who is the party’s nominee for governor in Georgia — he has also confused allies at times by not getting behind winning candidates who support his message. In Nebraska, for example, he did not endorse Kara Eastman, a House candidate and ardent supporter of “Medicare for All,” who swept to victory last month in the Democratic primary over a former congressman.

And where Sanders has plunged in most directly, voters have not necessarily followed his lead. In Iowa, where he nearly defeated Hillary Clinton in the 2016 caucuses, Sanders campaigned alongside Pete D’Alessandro, a former aide in his presidential bid, and cut a television ad boosting him in a contested congressional primary. It had little impact on the race and D’Alessandro finished a distant third.

Still, even in defeat, Sanders may be building goodwill with candidates — and, in many cases, former candidates — who echoed his message, and who say his support brought them new attention from voters and the media.

“Just a connection with him I think helped my campaign,” said Greg Edwards, who was endorsed by Sanders but lost his House primary in Pennsylvania. Sanders noted that he was often endorsing underdog candidates who would be outspent in campaigns. He added that the real goal was to “rally ordinary people into the political process.”

“I think it’s fair to say that in that sense we are succeeding quite well,” he said.

But as the high-profile losses have piled up, Jealous’ race for governor of Maryland has taken on outsize importance as a gauge of Sanders’ influence — and as one of his few remaining opportunities to help install a close personal ally in high office. Jealous was a top surrogate for Sanders’ 2016 campaign and one of only a few prominent African-American advocates of his candidacy. Should he win the governorship of Maryland, Jealous could be an even more important supporter for Sanders in 2020.

“Bernie knows that I have a lot of friends who could be running for president in 2020,” Jealous — who has also campaigned with Sen. Cory Booker of New Jersey and Sen. Kamala Harris of California, also possible 2020 contenders — said in an interview before the rally last week.

A recent primary poll showed Jealous tied with the county executive of Prince George’s County, Rushern Baker, as front-runners in a crowded field. But if Jealous is to win in the primary, and then in the fall — no easy task given the popularity of Gov. Larry Hogan, the Republican incumbent — he, like others, may need more than an endorsement from Sanders.

As hundreds of supporters gathered in a downtown plaza before the rally, many seemed to be there for the same reason: Sanders.

Alejandra Diaz, 22, said she wanted to hear the senator’s remarks. Would his support make her more likely to vote for Jealous? she was asked.

“It does mean something that he’s endorsing him,” she said. “At least I know his character — it’s solid.”