Last year, as Maryland Republicans were struggling in their bid to unseat Sen. Barbara A. Mikulski (D), Daniel Bongino had another task on his mind: protecting President Obama.

Now, having resigned after a 12-year career in the Secret Service, Bongino is fighting his own uphill battle as he seeks to become the GOP nominee against Sen. Benjamin L. Cardin (D-Md.) in 2012.

Bongino, a political novice, is three months into his campaign, seeking to build a fundraising network from scratch and introduce himself to Marylanders who’ve probably never heard of him.

“The name ­recognition campaign’s a battle,” Bongino acknowledged in an interview last week in Severna Park, where he has lived for about a decade.

Since launching his bid in late May, Bongino has benefited from some publicity, appearing three times on Fox News Channel, once on CNN and several times on local TV networks.

The media are attracted to his unusual profile. Bongino, 36, spent three years on President George W. Bush’s security detail and two years with Obama and his family. Bongino said he is frequently asked how he feels about Obama.

“I give the same answer every time, because I mean it: The president was a wonderful guy,” Bongino said. “From what I saw, he was a wonderful father and a wonderful man, and he was very, very nice and very kind to me. I’m running for the U.S. Senate not because I have any personal animosity towards the president. . . . I just politically, ideologically disagree with a lot of the stances the Democratic Party takes.”

Cardin’s reelection race is among neither party’s key contests, mainly because Maryland has been anything but competitive in recent cycles.

Obama won the state by 26 percentage points in 2008 and will be atop the 2012 ticket driving Democratic turnout, particularly among African Americans. Last year, Mikulski beat Queen Anne’s County Commissioner Eric Wargotz (R) by 26 percentage points even as Republicans did well in races across the country.

Wargotz is mulling a bid against Cardin, as is Del. Patrick L. McDonough (R-Baltimore County). Given how easy it is to make the ballot in Maryland, it is likely that other Republicans will enter the fray as well. The primary is April 3.

Cardin, who won his first term in 2006 by defeating then-Lt. Gov. Michael Steele (R) by 10 points, will start the race as the strong favorite. But Bongino is undeterred by the odds. He argues that the state is more conservative than the Democratic registration advantage suggests, and he predicts that he will perform much better than Wargotz did last year.

“I didn’t get in to lose by 30 points, I’ll tell you that,” Bongino said.

He said that the campaign has “focused heavily” on the Eastern Shore and that he plans to make frequent visits to Western Maryland; both are heavily Republican regions in a Democratic-leaning state. Everywhere he goes, Bongino said, he is asked about the economy far more than any topic.

“Ninety-five percent, if not more, of the questions I get are, ‘What are you going to do to create jobs?’ ” Bongino said.

Bongino is strongly opposed to any tax increases, and he said he would have voted against the bipartisan deal to raise the debt ceiling, which became law in early August, because it did not include enough spending cuts.

Bongino said he would attack Cardin for his tax policies and his failure to support school choice.

Cardin’s campaign declined to discuss Bongino’s candidacy.

“Senator Cardin looks forward to having a discussion about issues important to the citizens of Maryland with the 2012 Republican candidate for U.S. Senate,” said Cardin spokeswoman Shelly Hettleman.

Bongino was born and raised in New York, and he served in the New York police department before joining the Secret Service in 1999.

Bongino was in the New York field office for three years before moving to Maryland in 2002 to work as an instructor at the training academy in Prince George’s County. He spent a year in the dignitary protection division and five years on the presidential detail. Bongino had been in the Baltimore field office for six months when he resigned to launch his campaign.

Bongino and his wife, Paula, own a mixed martial arts clothing company, GrappleSock, and his wife runs her own Web design company. They have a 7-year-old daughter and a second child due in January. (His wife found out she was pregnant the day he resigned from the Secret Service.)

Although he could have gotten his start in politics by running for a state or local government post before vying for the Senate, Bongino scoffs at the notion that he should have aimed lower or that he’s underqualified.

“With a résumé of leadership, why not” run for Senate? he asked. “What has political résumés gotten us? What has experience in politics gotten us?”