SOMERSET — It was Sean Bielat’s umpteenth town hall, this one in a small meeting room at a Quality Inn off Interstate 195, and there — again! — was a Kennedy supporter in the corner, waiting to catch a gaffe on film.

“I was just surprised that they went through the trouble,” said Bielat, 37, as he walked out of the room.

He dropped his voice in mock conspiracy, “— they’re in the lead!”

It’s no secret: In the race for the Fourth Congressional District seat vacated by legend Representative Barney Frank, Joseph P. Kennedy III is the favorite to win. The 32-year-old political scion has the famous name (Robert F. Kennedy was his grandfather) and has raised close to $4 million. A February poll conducted by the University of Massachusetts Lowell and The Boston Herald gave Kennedy a 2-to-1 lead in the district that stretches from Brookline to New Bedford.

Though Bielat maintains the numbers may have edged closer as Kennedy’s name recognition has worn off, he is the self-admitted Republican underdog. A Marine reservist and former tech executive who challenged Frank in 2010 and garnered 43.4 percent of the vote, Bielat has maintained throughout the campaign that he offers a no-nonsense fiscal responsibility that comes from his experience in the business world.

As the campaign edges to a close, the every-last-vote-counts urgency of the Senate and presidential races seemed largely absent. Days before the election, both candidates separately visited Franklin High School to address an advanced placement government class. For an hour, each talked fiscal policy and social issues with 45 teenagers, most of whom are too young to vote.

Kennedy, whose qualifications include the Peace Corps, Harvard Law School, and two years as a Cape Cod prosecutor, has largely stuck with the goals he outlined in the beginning of the race: supporting early childhood education and student loan relief, improving transportation infrastructure, strengthening the Affordable Care Act, and raising taxes for households earning more than $1 million.

But it has not been all smooth sailing for Kennedy. Shortly after he announced his candidacy, Kennedy heard from a constituent who delivered advice: “There’s one thing you can do to be the best advocate for this district — convince Barney Frank to run for reelection.”

At a Newton-Needham Chamber of Commerce meeting last week, he sidestepped repeatedly when one audience member asked him to identify three parts of the federal budget he planned to cut, leading the man to point out that Kennedy had not answered his question.

And his name has proven, at times, to be an obstacle. One of the questions he says he is asked most often: Have you met Taylor Swift?

It’s an image that Kennedy says he has worked hard to combat.

“We’ve tried very hard to get out as aggressively as we can to let people know who I am and what I care about — let people come out and kick the tires, right?” Kennedy told the Franklin High School students. “Kind of give it a little bit of a scrub and say, ‘Who are you?’ and let people get that sense of who you are and what you do.”

Even in Attleboro, where lawn signs along North Main Street are split about evenly between the two candidates, the stakes felt low. Wednesday night, Kennedy, along with 20 supporters, greeted disembarking commuters on the outbound platform of the commuter rail station. Kennedy tossed out “Hi, I’m Joe,” and offered handshakes as he sipped hot chocolate.

The candidate almost never mentions Bielat without being asked. And some of the Republican’s supporters still don’t know how to pronounce his name. (It’s BEE-lat, not BUY-el-at.)

Bielat’s camp says Kennedy has refused to engage on the issues, citing the fact that Kennedy agreed to only three formal debates, one only 15 minutes long that was broadcast at 7 a.m. (The two have made two other joint appearances.)

But even when a person dressed in a yellow chicken costume arrived at the commuter rail station, hoisting a “CHICKEN 4 CONGRESS” sign — the chicken’s two friends, high school students, said they were protesting Kennedy’s attempts to dodge debates — Kennedy just chuckled.

“Every time Sean has an opportunity to try to distract from what are the real issues in this race, he tries to do that,” Kennedy said later. “The whole idea that I’m somehow running away from interviews or not doing debates or anything else I just think is a farce.”

Kennedy’s supporters say his distaste for political tangling is part of his appeal.

“He is honest, you can tell,” said Eric Purcell, 41, an Attleboro resident who carried a sign at the commuter rail station. “On all the political commercials, his is the best by far because he’s being honest with you, he’s not throwing mud at the other guy, he’s not trying to make the other guy look bad. He’s just coming at you: ‘This is how I’m going to do it. If you vote for me, this is what you’re going to get.’ ”

On the trail, many of Kennedy’s and Bielat’s talking points sounded almost identical: They hoped to create a “pro-growth” environment that would inspire confidence in business owners too worried about the economy to invest their savings. Bipartisanship, they both say, is their aim. There have been testy moments. Bielat has repeatedly asserted that Kennedy relies on family connections and recently accused him of violating campaign finance laws, though Kennedy denied the accusations.

Two weeks ago, Bielat’s campaign released an online quiz — “Kennedy or Kardashian?” — comparing the candidate’s on-the-go tweets (“Lunchtime, stopping to chat with seniors before bingo”) to messages from the celebutante.

The next day, it released a 3-minute campaign video on YouTube, a mockumentary-style parody of the TV show “The Office.”

In one scene, a supporter says: “Joey 3’s staff is afraid to let him speak.”

Bielat looks up with the perfect comeback: “’Cause they probably haven’t told him what’s on his mind yet.”

In person, Bielat is more diplomatic.

“I think he’s a smart guy, he’s definitely been a nice guy the times that I’ve met him. I can’t say that for Barney Frank, but this guy is nice, you know?” Bielat said. “I just wish we could have, you know, an actual conversation or discussion about issues and why we’re both running.”

At town meetings and in debates, Bielat has homed in on fiscal responsibility, committing to lower the national deficit and cut federal regulations that he says discourage small businesses. Still, he said, the campaign has been grueling, and he is aware of the toll it has taken on his wife and two children,
one of whom was born last November.

“We’ve raised a million dollars, which is fantastic — for most races in the country. Not for this one,” Bielat said. “And I’m glad of the sources of that money. We’re not getting money from the PACs, and I think that’s how it’s supposed to be, but it’s really hard. It’s really hard when you’re running against people who have, you know, other sources.”

In downtown Attleboro the morning after Kennedy’s commuter rail meet-and-greet, Bielat and an entourage of campaign staffers hopped from store to store, making the case for each owner’s vote.

At Jonathan’s Coffee Cafe, Bielat was delighted to see a framed photo of himself on a previous visit — alongside photos of Kennedy and Senator Scott Brown.

“That’s what I love about Attleboro,” he said.

At a four-way intersection, Bielat approached a giant tooth — a waving white mascot for a local dentist’s office. Bielat expected a teenager — but inside the costume, he found 52-year-old Jack Graham.

Graham explained that he had lost his job in the health care industry because of illness, and struggled to find steady employment. His stint as a walking advertisement for a dentist’s office was not ideal. The outsourcing of American jobs overseas, he said, was at fault.

“You’ve got my vote,” Graham concluded.

Bob Ryan, a registered independent, rarely allows politicians inside his downtown sporting goods store to schmooze for a vote. On Thursday he made an exception for Bielat — the man’s got smart fiscal ideas, Ryan said. He voted for Bielat in 2010.

He couldn’t help but sound wistful.

“Well, I’d love to see you get in,” Ryan said. “But it’s an uphill battle, right?”