Robert F. Kennedy Jr. ended his independent presidential campaign and endorsed Republican Donald Trump, but Marylanders will still be able to cast a vote for him this fall.

Before dropping out, Kennedy’s supporters had amassed enough signatures on a petition to get him on Maryland’s ballot as a presidential candidate, state elections officials declared on Tuesday.

Tuesday was the deadline for the state to certify which candidates made the cut to appear on the ballot. Kennedy’s supporters had turned in 27,035 signatures to get the candidate on the ballot, and state officials determined that 15,268 of them were valid — well beyond the threshold of 10,000 signatures.

Kennedy will not turn down the spot on the ballot in Maryland, as he has done in other states, said Josh Mazer, who had been state director of the campaign.

The Baltimore Banner thanks its sponsors. Become one.

Mazer said Kennedy is withdrawing in competitive states, so that he won’t act as a “spoiler” by taking votes away from the leading candidates, Democratic nominee Kamala Harris and Republican nominee Trump.

But in some of those battleground states, including Michigan, it’s too late or legally impossible for Kennedy to withdraw this close to the election.

The campaign intends for Kennedy to stay on the ballot in non-battleground states, Mazer said, which gives voters another option.

“Marylanders now have another choice at the ballot box,” he said. “I think that’s a pretty valid reason to stay on the ballot.”

Maryland is not considered a battleground or swing state.

The Baltimore Banner thanks its sponsors. Become one.

Nearly 53% of Maryland’s voters are Democrats and the state has reliably voted for Democratic presidential candidates for decades, making it likely that Harris will win in Maryland.

In a new poll from AARP, Harris leads Trump in a head-to-head matchup in Maryland, 64% to 32%.

When other candidates, such as Kennedy, were included in the poll, Harris still led Trump, 59% to 29%. Kennedy took 5% in that poll, with Green Party candidate Jill Stein and Libertarian candidate Chase Oliver each polling at 1%.

Amassing at least some votes in states like Maryland could benefit Kennedy down the line for future political actions, Mazer said.

Mazer said some 250 volunteers submitted signatures to put Kennedy on the ballot, with some turning in only a few and others obtaining thousands of signatures. Mazer said he got 4,800 signatures by crisscrossing the state and soliciting signatures on college campuses, at farmers markets and at Motor Vehicle Administration campuses.

The Baltimore Banner thanks its sponsors. Become one.

Mazer said the Kennedy team worked to make clear that a signature didn’t necessarily signal support for the candidate, but rather support for giving the candidate an opportunity to win votes.

Now that Kennedy has suspended his campaign and endorsed Trump, some volunteers who disagreed with that action have stepped away, Mazer said.

Others plan to continue with a get-out-the-vote effort for Kennedy, though Mazer noted there’s no longer official support or funding from the campaign. “Anything we do will be on a volunteer basis,” he said.

The first mail-in ballots will be sent out to voters in late September, followed by early voting from Oct. 24 through Oct. 31 and traditional Election Day voting on Nov. 5.

Baltimore Banner reporter Rick Hutzell contributed to this article.