President Obama offered a public endorsement of Sen. Benjamin Cardin on Wednesday, giving the Maryland Democrat an early boost in his reelection contest.

Maryland is on neither party’s list of the most competitive Senate matchups this cycle, given that the state is reliably Democratic. But Cardin does face a potential primary challenge from state Sen. Anthony Muse (D-Prince George’s), an African American minister who has said he is “very serious” about the campaign.

Muse has also spoken of the importance of electing an African American to the Senate, so the backing of the first black president could help Cardin among the same Democratic voters Muse is hoping to reach.

“Ben is one of the good guys,” Obama says in a campaign e-mail that will go out to Cardin supporters this week. “He has the courage to stand up for what he believes and he works for solutions to the most important issues facing our nation. That’s why I need your help keeping Ben Cardin in the U.S. Senate.”

In an interview Wednesday, Cardin said he was “obviously very much flattered by” Obama’s support.

“I think it’s probably a little bit earlier than it would normally be announced, and I think the president is clearly doing that because of the Maryland filing deadlines being early,” Cardin said.

Candidates in Maryland must file by Jan. 11. The primary is April 3.

Cardin first won the Senate seat in 2006 after overcoming a tough Democratic primary against former congressman Kweisi Mfume. Cardin beat Mfume in that contest, 44 percent to 41 percent, and then went on to win the general over then-Lt. Gov. Michael S. Steele (R), 54. percent to 44 percent.

This time around, the most active and aggressive Republican candidate has been former Secret Service agent Daniel Bongino. Del. Patrick L. McDonough (R-Baltimore County) is also considering a run.

In addition to Cardin and Bongino, five other Democrats and five other Republicans have already filed to run for Senate. It is relatively easy to get on the ballot in Maryland compared to most other states.

Cardin said he expected “a competitive race” no matter who ends up being his opponent. But he also acknowledged that Obama himself would likely focus most of his campaign efforts on other, more competitive states.

“We know Maryland [Democrats] are going to have to do most of the work ourselves,” Cardin said.