Third in a series of profiles of Maryland’s Democratic gubernatorial primary candidates.

On paper, he’s a star applicant for the job, with a long and distinguished résumé: 15 years as a Maryland legislator; expert knowledge of the budget; lead roles in creating some of the state’s highest-profile laws.

Yet in the crowded race to become Maryland’s Democratic gubernatorial nominee, state Sen. Richard S. Madaleno Jr.’s strengths are also his weakness. He offers political experience when voters across the country are embracing non-politicians. He’s an insider when many are looking for outsiders.

And though he is popular inside his Montgomery County district, political observers say Madaleno is fighting an uphill campaign in the governor’s race against Democrats who started with higher name recognition.

He has the support of 6 percent of likely Democratic voters in a Washington Post-University of Maryland poll released June 5. Forty percent of registered voters overall said they would vote for him over Republican Gov. Larry Hogan if the election were held now, while 50 percent would vote for Hogan.

Madaleno, 52, is savvy enough to understand the obstacles — and optimistic enough to believe he can overcome them in the June 26 primary.

“We’ve been able to knock [on doors] and call more than half a million voters already,” he said during a May interview. “We know what we’re doing when it comes to a campaign in Maryland.”

Madaleno’s personal history is the sort of compelling story many Democratic voters seem to be looking for. He’s a married gay man who’s spent his time away from legislative responsibilities as a stay-at-home dad to the couple’s adopted son and daughter, now 11 and 14. He was the first openly gay person elected to the General Assembly, and is amazed still at the societal changes that allowed him to rise through the legislative ranks.

After a childhood in Silver Spring, Madaleno majored in history and Soviet studies at Syracuse University, where he was elected student body president and lived in fear of being outed. After graduate school, he thought he might find work at the CIA, the NSA or the State Department — until he learned about background lie detector tests that included questions about same-sex relationships.

His first job offer was nearly the last thing he wanted to do: become a budget analyst for the Maryland General Assembly. But he also didn’t want to remain under his parents’ roof and field questions each day about how many résumés he’d sent out.

He took the job, and spent six years at the statehouse, followed by seven years as a legislative analyst in Montgomery County’s intergovernmental relations office until 2002. David Weaver, who was the county executive’s spokesman during that time, remembers Madaleno as usually the smartest guy in the room, and a behind-the-scenes architect of what’s known as the Thornton Plan, created to provide equitable education funding across the state.

“There are a lot of smart people in this town, but he has the ability to take that knowledge and translate it into action, into policy that impacts lots of people,” Weaver said.

In 1999, Madaleno met his future husband, Mark Hodge, who he said was stylish and attractive and seemed “totally out of my league.” They married in a church ceremony in 2001, but the union would not be recognized by the state for another dozen years, after Madaleno helped lead the push to make Maryland among the first in the nation to approve same-sex marriage by popular referendum.

Madaleno was elected to the House of Delegates in 2002 and the state Senate four years later. In 2011, he championed Maryland’s version of the “Dream Act,” which grants in-state public tuition rates to certain undocumented immigrants. He co-sponsored the Firearms Safety Act of 2013, which banned assault weapons and high-capacity magazines for firearms, and sponsored legislation last year that made Maryland the first state in the nation to say it would provide money to Planned Parenthood clinics if Congress cut funding.

During this year’s session, he sponsored a successful bill that prohibits licensed medical professionals from practicing “conversion therapy” on gay minors.

He credits his empathy for women, minorities and other disenfranchised groups not to his own experience as an outsider, but to the mission instilled in him attending a Jesuit high school, Georgetown Prep: to care for, educate and provide health care to the poor. “That stuck with me,” he says.

Drawing on his expertise as a former budget analyst, Madaleno became vice chair of the Senate budget and taxation committee in 2015. He and state Sen. Edward J. Kasemeyer (D-Baltimore County), the committee chair, disagreed on policy issues sometimes, but worked well together.

“We became good friends over the course of time, and I relied on him greatly,” said Kasemeyer, who is retiring after his term ends in January. “He’s incredibly knowledgeable about state government.”

Longtime Senate President Thomas V. Mike Miller Jr. (D-Calvert) says Madaleno has led “by being who he is, by being a budget expert and by working with all sides, Republicans as well as conservative and moderate Democrats.”

Despite their fondness for Madaleno, both Kasemeyer and Miller are supporting one of his opponents, Prince George’s County Executive Rushern L. Baker III, who served in the statehouse before Madaleno. “Rich was very nice and persistent in asking for my endorsement,” Kasemeyer said. “However, I had told Rushern several years ago I thought he’d be a good candidate.”

Madaleno has shown a willingness to go after his Democratic opponents, perhaps more than any other candidate. He challenged Benjamin Jealous to a one-on-one debate on education policy, saying his opponent’s plan lacks specifics. He accused tech entrepreneur Alec Ross of insensitive language after Ross referred to him as someone who “prances around Annapolis.” He criticized former Michelle Obama aide Krishanti Vignarajah for having voted in D.C. rather than Maryland.

Madaleno drew attention this week with an anti-Trump campaign ad that shows him and his husband kissing. He has been strongly critical of Hogan on budget priorities, particularly education spending, and for not taking a harder line against President Trump.

The Republican governor won an underdog victory in 2014 after promising to roll back tax and fee hikes passed by the Democratic-majority legislature during the administration of Gov. Martin O’Malley. Should Madaleno win the nomination, Hogan would be able to highlight the senator’s votes on those increases.

But Madaleno said he’s happy to debate taxes and fees with Hogan, who he says has been dishonest in his attacks on Democrats.

“I’m going to remind voters that in fact . . . we passed the biggest tax cut for the working families of Maryland in the state’s history,” Madaleno said. “In order to make it work we raised taxes on upper-income people.”

The gas tax that Hogan railed against as a candidate, Madaleno added, generates revenue for transportation projects that the governor has made a top priority. “He talks about, ‘I’m finally getting this done,’ ” Madaleno said. “Well, really? If we had listened to you, that road, that new safer bridge, would not be here.”

Next: Krishanti Vignarajah

Read more candidate profiles: