The 40th Annual J. Millard Tawes Crab & Clam Bake drew several politicians from both major parties, including Maryland Gov. Larry Hogan (R). (Michael S. Williamson/The Washington Post)

It took Maryland Gov. Larry Hogan (R) 30 minutes to walk 30 feet Wednesday inside the iron gates of the marina in Somerset County, where the J. Millard Tawes Crab and Clam Bake was in full swing.

There was a woman with a large stuffed-crab hat who wanted a picture. An artist who wanted a hug. And an official from Williamsport, in Washington County, who wanted to pitch an idea about creating jobs in his town.

Hogan, who chose the schmoozefest over attending the Republican National Convention in Cleveland, enjoyed every ­minute.

“It’s kind of a slice of Maryland,” Hogan said of the annual event, where for 40 years politicians have spent the third Wednesday in July shaking hands with Marylanders and talking deals with lobbyists and other lawmakers over beers and crabs. “There’s nothing that compares to it. I love coming here.”

Hogan wasn’t able to attend the crabfest last year, his first as governor, because he was battling cancer and was advised to avoid large crowds. If his preferred presidential candidate, New Jersey Gov. Chris Christie, had won the Republican nomination, Hogan might have missed Tawes for a second year.

Maryland Gov. Larry Hogan gets a warm greeting from Ruby Byrd who was working at a crab booth. Byrd wanted to give Hogan a full-on hug but she was worried that the crab spices on her hands would soil his shirt. So, she just offered him a kiss on the cheek. (Michael S. Williamson/The Washington Post)

But the former real estate executive, who has made no secret of his disdain for GOP nominee Donald Trump, said shortly after Christie dropped out that he would choose ­Crisfield over Cleveland.

“I was elected by all of the people of Maryland. Republicans are 26 percent of the vote,” Hogan said, ignoring the Trump signs hanging near the tent of the Somerset County Republican Club, where people were selling $20 raffle tickets for a chance to win an AR-15 rifle. “It’s not just Republicans that I represent.”

Bill Benson, who was manning a Republican party booth, puts together some Trump campaign signs at the 40th Annual J. Millard Tawes Crab and Clam Bake. (Michael S. Williamson/The Washington Post)

House Minority Whip Kathy Szeliga (R-Baltimore County), who also skipped the GOP convention, said pressing the flesh at Tawes was an important part of her campaign for an open Senate seat against U.S. Rep Chris Van Hollen (D) — who also was in Crisfield.

“I wouldn’t miss this. This is the place to be,” Szeliga said. “It’s Americana at its best.”

While Szeliga was at one end of the marina chatting with voters, Van Hollen was at the other end doing the same.

The Democrat said that he came to “show support for an important part of Maryland. . . . I’ve been spending a lot of time on the Eastern Shore.”

Rep. Chris Van Hollen (D-Md.) was one of the politicians who attended the Crab and Clam Bake. (Michael S. Williamson/The Washington Post)

But Hogan was the main attraction, and the crowds that surged around him were a clear indication of his popularity and what possible Democratic challengers could be up against when he runs for reelection in 2018.

Prince George’s County Executive Rushern L. Baker III (D), widely considered a likely candidate, on Wednesday made his first appearance at Tawes in nearly 15 years. Back then, he was in the state legislature leading the Prince George’s delegation. He was told by lobbyist Bruce Bereano that Tawes was the place to meet with Democrats and Republicans during the summer to get things done.

“I decided this was a good time to see what’s going on again, to reconnect with a lot of folks I don’t get to see in Annapolis,” Baker said, “and just kind of check the landscape of the state. I don’t get a chance to get around the state. So I want to do that.”

Democrats such as Jacqueline Butler of Baltimore County said that they wanted to see Hogan and thank him for lowering tolls and pushing small reductions in taxes.

“I told him he’s good people,” Butler said. “I’m not a Republican; I’m a Democrat. But I feel he’s done a good job so far.”

Jennifer Smith, the artist, praised Hogan’s commitment to the arts. She is getting state help to preserve a historic building and transform it into an artists’ retreat in Crisfield.

Maryland Gov. Larry Hogan poses for a photo with some officers from the Somerset County Sheriff's Office. (Michael S. Williamson/The Washington Post)

Doug Gosnell, who lives in Wicomoco County, said he and his wife, Donna, “just wanted to say hello.”

“He’s a nice guy, a nice governor, we like him,” Donna added.

“Very much,” their friend, Sandra Henry, chimed in.

Hogan paused to hug Jackie Wellfonder, who worked for Change Maryland, the nonprofit group that laid the groundwork for his gubernatorial bid. He expressed surprise that Wellfonder wasn’t in Cleveland, but she said his choice made perfect sense.

“I really respect his decision to stay local,” she said. “I think he made the best decision in light of his own reelection.”

Donnie Stotelmyer drove nearly four hours to propose relocating the headquarters of the Chesapeake and Ohio Canal National Historical Park to Williamsport, where Stotelmyer is the town clerk.

He handed a manila folder filled with papers to Hogan with his business card attached. Then he made the same pitch to Comptroller Peter Franchot (D), another possible gubernatorial candidate, and to Van Hollen.

“I have to get them all while I can,” Stotelmyer said as sweat began to show through his blue T-shirt.