State Sen. Richard S. Madaleno Jr. (D-Montgomery) announces his campaign for governor on July 17 in Rockville, Md. (Katherine Frey/The Washington Post)

Maryland gubernatorial candidate Richard S. Madaleno Jr. has picked up an endorsement from U.S. Rep. Jamie B. Raskin (D-Md.), a welcome boost for the longtime state senator from Montgomery County, who has struggled to gain traction in the crowded Democratic primary.

Raskin, a former state lawmaker who worked with Madaleno in Annapolis to abolish the death penalty, pass marriage equality, increase the minimum wage and toughen gun laws, said his former colleague is the best candidate to take on Gov. Larry Hogan (R) in the general election.

“He’s got the values and the experience to lead the state in a progressive and an effective way,” said Raskin, who is slated to announce the endorsement Friday night. “Rich Madaleno is always in the moral center.”

The endorsement is one of the biggest so far for Madaleno, a 16-year lawmaker, whose support in polls has been in the low single digits.

A poll released Thursday by Mason-Dixon Polling and Strategy gave Madaleno, who would be Maryland’s first openly gay governor, 4 percent of the vote. Prince George’s County Executive Rushern L. Baker III led the field with 26 percent, followed by Baltimore County Executive Kevin Kamenetz with 15 percent and former NAACP president Ben Jealous close behind with 14 percent. Thirty-two percent of the respondents said they were undecided. The primary is June 26.

“We have a truly excellent field of candidates, and I’d be proud and go out and campaign for any of them, but Rich Madaleno to me gives us the complete package to win in November and lead the state,” Raskin said.

U.S. Rep. Jamie B. Raskin (D-Md.) has endorsed Madaleno, his former colleauge in the Maryland General Assembly, for governor. (Alex Wong/Getty Images)

Madaleno serves as the vice chair of the Senate Budget and Taxation Committee. He worked as a legislative aide in the General Assembly before winning election to the House of Delegates in 2002 and the Senate in 2006.

In a straw poll after a recent forum hosted by United For Maryland, a political action committee, Madaleno received 41 out of 217 votes, the most of any candidate who participated.

Madaleno received support from 19 percent of those who attended the forum; former Michelle Obama policy director Krishanti Vignarajah took 17 percent, while Baker received 2 percent.