There were laughter, tears, raucous cheers and awkward silences. But more than anything else, it was a punch in the gut that President Trump delivered Tuesday night.

Time after time, on issue after issue, he laid down a marker about the remaining two years of his term — and the outlines of his re-election campaign.

Speeches that are too long — as this one was — often smother their key points in windy verbiage. But there was no mistaking Trump’s meaning or his intent to seek a second term on the platform of a strong economy, strong defense and secure borders.

The state of the union is frighteningly divided and hostile, but the state of the president’s aim is sound. For all the talk of chaos and churn in his administration, Donald Trump knows what he’s about. As he always has, he’s playing to win.

True to White House billing, the president was conciliatory at times and urged national unity in the face of domestic and international threats. Perhaps he was even sincere in those wishes, but on virtually all the big issues dividing America, Trump took bold and resolute stances that left little room to the imagination and even less wiggle room.

“I will get it built,” he said about a wall after a lengthy discourse on the problems of the southern border in which he urged Democrats to join him in ending the scourge of sex trafficking, drugs, gangs and illegal immigration.

He derided the rising calls on the far left for a socialist approach to economics, declaring, “America will never be a socialist country.”

The Fox TV camera flashed a picture of Bernie Sanders, who looked appropriately miserable at that moment. Indeed, most Dems were miserable throughout the night, and many could not bring themselves to applaud much of anything, including record-low unemployment, lest they be seen as encouraging the president they love to hate. Imagine that.

The speech comes at a crucial time in the Trump presidency. From special counsel Robert Mueller to House Dems to Manhattan prosecutors, Trump is surrounded by those who want to bring him down and lock him up.

The cacophony of criticism is growing by the day, thanks to the expanding field of screeching Dems seeking the party’s 2020 nomination. Naturally, the anti-Trump media, formerly known as the mainstream media, is delighted to amplify each and every attack and pile on with their own dark views of him.

On many days, there is a Trump-vs.-Everybody Else quality to the scrum, with some of the president’s party mates either taking the other side or squirming uncomfortably in his shadow.

Yet if Trump feels isolated and beleaguered, he did a masterful job of hiding it. The one crack came in a sequence where he warned that the nation’s “economic miracle” could be stopped only by “foolish wars, politics or ridiculous partisan investigations.”

That got a loud cheer from many Republicans, but the next line fell flat. “If there is going to be peace and legislation, there can’t be war and investigations,” he said, adding, “It just doesn’t work that way.”

I expected Dems to erupt in boos and walk out. But that would have required them to get off their butts.

The heart of the speech, of course, was the battle over immigration, with even the timing dictated by the partial government shutdown over Trump’s demand for $5.7 billion for a wall. He had to eat crow to reopen the government, but he was wise to scuttle suggestions that he give the speech somewhere else during the shutdown.

It belonged in the House chamber, with all of Congress present, with the setting giving added importance to every word — and increasing the TV audience.

He called the border an “urgent national crisis,” thus setting the stage for a likely emergency declaration to build barriers if Congress will not fund them. He noted the approach of new caravans, and how some in the Mexican government had bused them to the American border and that he sent 3,750 more troops in response.

“This is a moral issue,” he said, properly framing the dual societies of legal and illegal as sapping our nation’s strength and diminishing America “in countless ways.”

He also rubbed the issue in the face of elitist opponents, saying that no issue better “illustrates the divide between America’s working class and America’s political class than illegal immigration.”

Pols and their donors have walls and guards, he said, while “working-class Americans are left to pay the price of illegal immigration.”

It was, in a speech full of punches, a haymaker. While most of his remarks were necessarily aimed at people watching at home, that one was a right hook to the Democrats — and some squishy Republicans — in front of him.

No other politician in America today would dare say such a thing. But he does, and it’s why he’s in the White House — and why the other side detests him.

Alas, it’s unlikely that Trump will be able to embarrass Congress into giving him the $5.7 billion, but he is holding off on the emergency declaration to give lawmakers a final chance. We will know in a few days, perhaps by the end of the week, whether the bipartisan panel can come to an agreement that can pass both houses and that the president would sign.

Either way, Tuesday night was far from the final word on the subject. Rather, it sent a powerful message that Trump is not backing down and remains determined to plug the holes on the border, one way or another.

Whether that’s good politics for him and his party remains to be seen. But it’s certainly good for America, and for that, we should all rise and applaud.