Donald Trump’s campaign praised him for not bringing up former president Bill Clinton’s past scandals during the first presidential debate against Hillary Clinton. (Video: Bastien Inzaurralde/The Washington Post;Photo/Melina Mara/The Washington Post)

Four years ago, President Obama was in somewhat the same position that Donald Trump is in now.

Obama’s first debate against GOP presidential nominee Mitt Romney had gone badly, and advice was flooding in from all directions. But one suggestion really hit home, recalled Jon Favreau, who was then Obama’s chief speechwriter.

“You don’t win the second debate,” former president Bill Clinton told Obama, “by relitigating the first one.”

Trump might also do well to heed that counsel — especially because the next debate, on Sunday night in St. Louis, will be conducted in a town-hall-style format.

Half the questions will come from an audience of undecided voters, selected to be there by Gallup.

Schedule: When Hillary Clinton and Donald Trump will debate

The other half will come from moderators Anderson Cooper and Martha Raddatz.

After he was bested by Democratic nominee Hillary Clinton in the first debate, Trump said, “I may hit her harder” in the second one.

“Trump is easily baited, and he refuses to let these things go,” Favreau said.

But settling scores may be exactly the wrong approach in a town hall debate, where the candidates will be responding to the specific concerns of individual Americans and where voters will be studying the candidates for their ability to relate to those concerns.

At the first town-hall-style presidential debate in 1992, one man in the audience implored the candidates, “Can we focus on the issues and not the personalities and the mud?”

That event is also remembered for the most infamous example of what not to do when voters are posing the questions. The camera caught then-President George H.W. Bush checking his watch as a woman asked him how the national debt had affected him personally.

The history of presidential debates done in this style suggests that stagecraft, body language and empathy matter more than they do in conventional settings, where the candidates tend to stand at lecterns and spar.

In this October 1992 photo, then-President George H.W. Bush, left, talks with independent candidate Ross Perot as Democratic candidate Bill Clinton stands aside at the end of their second presidential debate in Richmond. (Marcy Nighswander/Associated Press)

“We should expect a different kind of question, and we should expect that we are going to see a different facet of the candidate,” said Kathleen Hall Jamieson, a political communication expert at the University of Pennsylvania’s Annenberg Public Policy Center. “The average person watching the debate should be able to see him or herself in the questioning process.”

While combativeness may backfire on Trump, there are challenges for Clinton as well.

Jamieson noticed, for instance, that the Democratic nominee went into “lawyer mode” when confronted by hostile or skeptical questions in previous encounters with audiences. “That’s when you get the careful statements, the careful parsing of words.”

Lanhee Chen, who was an adviser to Romney in 2012, said: “Being able to demonstrate an understanding of the person’s question in a non-sterile way is important. When you’re responding to a moderator, you can do it in a clinical way. Connecting is really important in a town hall format.”

Nor does a candidate want to hand an opponent an opportunity to do so. Obama in 2012 had been looking for chances to remind the audience of Romney’s wealth, and the GOP nominee gave him one when he asked, “Mr. President, have you looked at your pension?”

“You know, I don’t look at my pension,” Obama replied. “It’s not as big as yours, so it doesn’t take as long.”

Town halls “test two things at once: the depth of your substantive knowledge and also your capacity for empathy. They test your head and your heart,” said Paul Begala, who advised Bill Clinton’s first presidential campaign.

Clinton’s 1992 campaign was the first to propose putting the candidates in a town hall setting for one of the debates. His team was surprised when Bush agreed to it.

The Arkansas governor was comfortable with the format, having employed it often during his presidential bid.

“It is what we did with Clinton in the primaries, when it was all collapsing around us in New Hampshire,” Begala recalled. “I do think they helped save him. In fact, we spent our own campaign money to broadcast them.”

It turned out that Americans at home loved watching that first town hall faceoff, according to focus groups that the Commission on Presidential Debates had set up in cities around the country.

“The public identifies with the citizens who are there asking questions,” said Janet H. Brown, the commission’s executive director.

For all her husband’s success at using his rapport with ordinary voters to his advantage, Hillary Clinton’s campaign has been careful about managing expectations for Sunday’s debate.

“She does great in these formats, and we expect she will do well here, too, but it’s not a bad format for Trump,” said Clinton communications director Jennifer Palmieri.

As it happens, an informal adviser to Trump — Roger Ailes, the former head of Fox News — helped bring the town hall setting to modern presidential politics.

In 1968, Ailes was a young political operative looking for a way to humanize the stiff and awkward Richard Nixon and to present him as a steadfast and confident figure.

So Ailes orchestrated a series of “Man in the Arena” events, in which Nixon would answer scripted questions from audience members.

Some of the themes from those town halls nearly half a century ago are strikingly resonant today.

In one, for instance, an African American man challenged Nixon for his use of the phrase “law and order” — a favorite of Trump’s in 2016, as well.

“Does ‘law and order’ now take on a new meaning, since black Americans are making a demand for equality” while being “slaughtered and murdered, maimed and burned?” the man asked.

“You’ve put your finger on a very troublesome question for every American, white American, black American. And let me be quite direct in the answer. I don’t go along with people that say law and order is a code word for racism,” Nixon said. “I don’t go along with that because . . . black Americans have just as great a stake in a law-and-order society as white Americans.”

Voters watch town halls differently from other debates.

In 2012, for instance, the first debate, which had a traditional format, drew a slightly bigger audience, but the town hall that followed it held viewers’ attention longer, according to an Annenberg Center study of Nielsen data.

The center’s subsequent surveys found that young adults in particular deemed town halls more helpful than conventional debates in making up their minds on how to vote.

As the candidates give their answers, they may be shown on a split screen with the audience member who asked the question. Facial expressions often reveal whether the person who posed the question is satisfied with what they are hearing.

Mastering the stage can be crucial for candidates in a town hall setting, where they are allowed to roam more freely and where the camera will catch them from more angles.

Romney’s team went so far as to construct a replica of the stage and moved it from city to city for his prep sessions, so that it would feel comfortable when he did the real thing.

In Obama’s mock debates, then-Sen. John F. Kerry played Romney and occasionally moved close to the president so that Obama would not be rattled if the former Massachusetts governor invaded his personal space.

The dramatic gesture can backfire, as it did in 2000, when then-Vice President Al Gore strolled and stood uncomfortably close to Texas Gov. George W. Bush. He got a withering look and a dismissive nod in response.

In 2008, GOP nominee John McCain became a distraction as he wandered the stage, occasionally blocking the camera shot. The “Daily Show” parodied him as a doddering old man, dubbing in a voice that said: “Has anybody seen my dog? Has anyone seen my little Mr. Puddles?”

Among Trump’s coaches for the next debate is New Jersey Gov. Chris Christie, whose often-combative exchanges with voters at town halls in his state made him a national celebrity.

Jamieson pointed to a CNN forum that Trump attended with his family: “Donald Trump in those exchanges is very, very, very different from the Donald Trump on the stump and the Donald Trump in the debates. What that says is there is a face of Donald Trump that hasn’t been featured.”

Some Republicans also note that Trump feeds off the energy of the crowds at his rallies, and they hope that something similar will happen Sunday.

“I think he’s better than her at talking from the heart,” said Brett O’Donnell, a communications consultant who has long experience working with GOP candidates. “The question is, how will he do it, and how well will he do it?”

O’Donnell cautioned Trump against following up on his threat to bring up the Clintons’ marital history and Bill Clinton’s infidelities. “I think he needs to get on offense, but it needs to be substantive offense,” O’Donnell said. “It cannot be Gennifer Flowers and Bill Clinton and personal attacks.”

In the end, Begala said, the likely winner of Sunday’s town hall will be the candidate who comes up with the best answer to the real question that voters will be asking: “Are you one of us?”