WASHINGTON — President Donald Trump tried to shed the polarizing image and words that have stunted his popularity and thwarted his ability to pass bipartisan legislation, attempting to recast himself Tuesday as a unifying figure in his first State of the Union address.

"Tonight, I call upon all of us to set aside our differences, to seek out common ground and to summon the unity we need to deliver for the people," he said at the top of his roughly 80-minute speech. "This is really the key: These are the people we were elected to serve."

It was a striking difference in tone for a president who came into office decrying "American carnage" at his inaugural, and since then often has spoken and tweeted in harsh terms about his perceived enemies, including lawmakers of both parties and his vanquished opponent, Hillary Clinton.

Trump continued to warn against what he sees as the scourge of illegal immigration. But he cloaked the warnings with soft descriptions of the American character, describing the nation as "one team, one people and one American family," and suggested immigrant communities actually would benefit from his policies.

He alluded to one frequent target — the mostly black NFL players who have protested police violence and other racial injustice by kneeling for the national anthem — but did so only obliquely, not mentioning them as he usually does but instead emphatically equating reverence for service members with "why we proudly stand for the national anthem."

As he reeled off natural disasters and tragedies of the last year, including the shooting at a congressional baseball practice that nearly killed a Republican House leader, he emphasized that "we came together, not as Republicans or Democrats, but as representatives of the people."

The speech came in what's become a familiar spot for Trump: at a historic low in polls, furious over the Russia investigation and frustrated that he is not getting credit for a good economy.

But the president put much of that aside, claiming credit for the economy as he sought to lay the groundwork for a bipartisan achievement that has eluded him — on immigration, and a significant new infrastructure initiative. He said notably little about three issues that animated his campaign and first year as president: health care, trade and the international Iran nuclear deal. Trump also made no mention of China.

Trump, like other presidents facing troubles, is hoping the high-profile, nationally televised speech will help him move past the tumult in his White House and the shadow of the Russia investigation — an inquiry into his campaign's possible collusion with Russia's election meddling and his own alleged acts of obstruction — that has clouded his first year. Trump refrained from mentioning the investigation.

"This is in fact our new American moment," Trump said, repeating a phrase used by Clinton to describe President Barack Obama's foreign policy when she served as his secretary of State. "There has never been a better time to start living the American dream."

Trump hammered the theme of "building a safe, strong, proud America," which fits loosely around policy proposals for a $1.5-trillion plan to build a "safe, fast, reliable and modern infrastructure our economy needs and our people deserve," an increase in military spending and an overhaul of the immigration system. His controversial immigration plan would sharply cut the number of legal immigrants while allowing a path to citizenship for young "Dreamers" who were brought to the country illegally as children.

Trump framed his desire to restrict immigration as a security issue, arguing a porous border has increased the threat of terrorism and drug trafficking. Immigrant advocates say Trump is creating scapegoats, and deepening racial and ethnic divides.

The president, however, contended he wants to be a uniter.

"Tonight I am extending an open hand to work with members of both parties, Democrats and Republicans, to protect our citizens, of every background, color and creed," he said.

Earlier Tuesday, Trump told a group of network television anchors meeting at the White House that his biggest lesson since taking office more than a year ago has been tempering his profit-centered business instinct with the need to show "heart" in his governing decisions.

"What I'm doing now, a lot of it is heart, a lot of it is compassion, a lot of it is far beyond money — such as immigration," he said. "If I was doing this purely from an economic standpoint, I would sit down and tell you in one second what I'd be doing, OK?"

Eleven months ago, Trump addressed Congress and a prime-time TV audience from the Capitol, but by tradition, a president's first report on the state of the union — based on a constitutional requirement — does not occur until after a year in office.

Besides emphasizing immigration and infrastructure, Trump nodded to other priorities, including an undefined plan to reform federal prisons. He talked about solving the opioid crisis, yet called for greater law enforcement rather than new funding or programs to combat the epidemic of addiction.

Trump announced he would keep open the U.S. military prison camp on Guantanamo Bay, Cuba, reversing another Obama administration policy and signaling a return to military detentions for captured terrorism suspects. The once-populous camp now houses just 41 prisoners.

Although presidents traditionally use these speeches to lay out their vision early in the year, they also claim credit for first-year achievements. Trump spoke about the economy and his $1.5-trillion tax cut, boasting about the rising stock market and low unemployment.

He also repeated his contention that his policies brought black unemployment to a historic low, when that development — like other economic gains — reflects a trend that began in Obama's first term, after the Great Recession.

As Republicans rose and applauded Trump's assertion about black employment, members of the Congressional Black Caucus sat stone-faced; many wore African print shawls in apparent protest of Trump's recent slur calling the nations Africa "s---hole" countries.

In a recent Pew poll, 41 percent of Americans rated the economy as excellent or good, one of the strongest such ratings in a decade. Yet many Americans do not give Trump credit. On average, polls show his approval at about 40 percent, lower than the standing of any of his predecessors in the modern era after a year in office.

"Two words I don't think we'll hear tonight: Thanks, Obama," Senate Minority Leader Charles E. Schumer, D-N.Y., said before the speech. Schumer, like most Democrats, sat glum-faced through much of the address.

The tax cut law has elicited mixed expectations, according to Pew, with about a third of Americans saying they expect it to improve their personal finances, a third saying they expect it to harm them and another third expecting no change.

Other polls have shown a majority of Americans believe the tax cuts favor high-earners, contrary to Trump's claim — repeated in his address — that they mostly benefit the middle class.

Administration officials say the tax cut will grow more popular as Trump sells it and as the large reduction in corporate rates leads to higher middle-class wages. Economists, including at the Federal Reserve, have more modest expectations, predicting a small short-term effect on economic growth.

Trump named the tax cuts, reduced regulations and what he calls an end to the "war on American energy" — including coal — among promises fulfilled. He credited the tax cuts with prompting businesses to give bonuses for roughly 3 million workers, though he exaggerated the amounts as "thousands and thousands of dollars" when most are $1,000. Some wage hikes and bonuses were negotiated in union contracts or planned by corporations before the tax cuts became law.

Trump also trumpeted success in beating back the militant group Islamic State, while conceding that "there is much more work to be done."

"Past experience has taught us that complacency and concessions only invite aggression and provocation," he said. "I will not repeat the mistakes of the past administrations that got us into this dangerous position."

Trump, like every president since Ronald Reagan, invited guests who reflect aspects of his agenda to sit with the first lady. Among those joining Melania Trump were Americans said to be benefiting from the new tax cuts, parents who lost children to gang violence, a Marine who re-enlisted after losing his eyes and legs, and a man who led a volunteer rescue effort for victims of Hurricane Harvey.

Democrats had their own guests, dominated by a number of "Dreamers."

For all the attention paid to them, these prime-time addresses seldom move public opinion much. And Trump has had a particularly difficult time sticking to a message, often creating new controversies within days of a well-received speech — like the one last February, which he followed with an explosive tweet alleging without evidence that Obama had wiretapped his phones.