A Maryland gubernatorial candidate has staged what appears to be the first same-sex kiss by any candidate in a campaign ad – and aired it on one of President Donald Trump’s favourite stations.

“I’m running for governor to deliver progressive results and to stand up to Donald Trump,” Maryland state senator Rich Madaleno says in his new campaign ad.

The senator then lists off several things he’s done to “already infuriate” the president – including defending Planned Parenthood, helping ban assault weapons in Maryland, and supporting public schools over voucher programmes – before turning and planting a kiss on his husband.

“Take that, Trump,” he says.

The 30-second ad ran on cable in Maryland's Montgomery County, and in the Washington area on Fox News – a channel Mr Trump is said to play near-constantly at the White House. Mr Madaleno's campaign claims it is the first same-sex kiss by a candidate and spouse in a political campaign ad.

The senator has represented Montgomery County in the state General Assembly for 16 years – the same amount of time he’s been married to his husband, Mark Hodge. The two live in the town of Kensington with their two children, Jackson and Katie.

Thousands march against Donald Trump in LGBT rights parade Show all 8 1 /8 Thousands march against Donald Trump in LGBT rights parade Thousands march against Donald Trump in LGBT rights parade A marcher hold a sign that reads "Love is Love is Love" on the National Mall with the Washington Monument in the background during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers unfurl a huge rainbow flag as they prepare to march in the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade Marchers gather to hear speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade Gil Mendez, of San Francisco, holds a sign to honor the victims of the shooting at the Pulse Nightclub in Orlando as he marches during the Equality March for Unity and Pride in Washington AP Thousands march against Donald Trump in LGBT rights parade An demonstrator looks on as LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher listens to speakers at the end of the Los Angeles LGBTQ #ResistMarch AP Thousands march against Donald Trump in LGBT rights parade LGBT members and their supporters take part of the Equality March for Unity AFP/Getty Images Thousands march against Donald Trump in LGBT rights parade A marcher mugs for the camera during the Los Angeles LGBTQ #ResistMarch AP

Mr Madaleno was the first openly gay person elected to the Maryland House and Senate, and helped pass a bill legalising same-sex marriage across the state in 2012. Maryland was one of the first states to extend the right to marry to same-sex couples after a public vote on the bill in 2013.

The senator is running in a crowded Democratic primary, competing for the change to face off against Republican Governor Larry Hogan. Voters will head to the polls on 26 June to decide which of the seven candidates will be the party’s nominee.

In recent polling, Mr Madaleno has trailed at least 10 points behind the two Democratic frontrunners, Ben Jealous and Rushern Baker.

Donald Trump will be the first president to speak at anti-LGBT summit

Though Mr Trump said on the campaign trail that he would be a “friend” to the LGBTQ community, his administration has rolled back LGBTQ rights on several fronts.

His Justice Department has rescinded backed Obama-era protections for transgender students, and submitted a brief to the Supreme Court arguing for a bakery’s right to discriminate against same-sex couples. Mr Trump himself has pushed to reinstate a ban on transgender people serving in the military.