President Trump, whose first year in office saw near-constant turmoil and division, claimed Tuesday that he has ushered in an ebullient "new American moment" and issued a summons for "the unity we need to deliver for the people we were elected to serve."

The conciliatory tone of Trump's first State of the Union address was sharply at odds with the combative manner in which he has conducted his presidency — and with the tension evident between Republicans and Democrats in the Capitol, where he spoke.

"Over the last year, we have made incredible progress and achieved extraordinary success," Trump said. ". . . Through it all, we have seen the beauty of America's soul and the steel in America's spine."

The president set an ambitious agenda for his second year in office, from a $1.5 trillion plan to rebuild the nation's crumbling infrastructure to a four-pronged immigration package to a pledge to reduce prescription drug prices. His one-hour, 20-minute speech was the longest since Bill Clinton's State of the Union address in 2000.

The president laid out details of his immigration package, offering citizenship for undocumented immigrants brought to the United States as children, who are known as "dreamers," in return for increased spending on border security, including for his promised wall at Mexico's border; an end to the visa lottery; and limits on family reunification policies.

Trump used some of his most polarizing language when lamenting crime from MS-13 and other gangs, which he blamed on "open borders." He sought to repurpose the term "dreamer" by saying American citizens have seen their economic prospects dimmed and personal safety put at risk because of illegal immigration.

"The United States is a compassionate nation," he said. ". . . But as president of the United States, my highest loyalty, my greatest compassion and my constant concern is for America's children, America's struggling workers and America's forgotten communities." He added, in an apparent contrast with undocumented immigrants, "Americans are dreamers, too."

Trump has set a March deadline to end the Obama-era Deferred Action for Childhood Arrivals program, which has protected those who applied from deportation, and lawmakers are scrambling to come up with an alternative that can survive the political crosscurrents of both chambers.

The speech came at a crucial moment when the president faces a number of challenges: historically bad approval ratings for a chief executive at this point in his term, an investigation of Russian meddling in the 2016 election hanging over his administration and midterm elections ahead in which Democrats are expected to make significant gains in Congress.

Republicans enjoy total dominance in Washington, with the Democrats shut out of power in Congress and the White House. But the party has only one major legislative accomplishment, a new tax law, to show for its first year in full control.

Trump pointed to that achievement — which he again falsely claimed is "the biggest tax cuts and reforms in American history" — as contributing to a resurgent economy. He ticked off growth in jobs, wages, small-business confidence and a stock market that "smashed one record after another, gaining $8 trillion in value."

While Republicans cheered throughout, Democrats sat stonily. When Trump said the unemployment rate among African Americans was at a record low, for example, members of the Congressional Black Caucus refrained from applauding.

To give their official response, Democratic leaders picked third-term Rep. Joe Kennedy (Mass.), who marks the third generation of the Kennedy clan to serve in Congress. He spoke from a technical-school auto shop in Fall River, Mass. 

"It would be easy to dismiss the past year as chaos, partisanship, politics," Kennedy said. "But it's far bigger than that. This administration isn't just targeting the laws that protect us — they are targeting the very idea that we are all worthy of protection."

Other Democrats said Trump was particularly divisive in his discussion of immigrants and in tying them to crime. "If you were hoping for a unifying speech tonight, you got the opposite," said Sen. Chris Murphy (D-Conn.). "Between the long victory lap with Republicans over tax reform to the over-the-top demonization of immigrants, President Trump picked at pretty much every political scab that exists in Washington today."

Trump made only passing reference to the devastation in Puerto Rico from Hurricane Maria, the federal government's response to which has been widely criticized as inadequate and slow.

Trump turned even more than presidents typically do to the stories of guests, seated in the gallery box of first lady Melania Trump, to put human faces on his policies and build the narrative arc of his speech. A president so often preoccupied with self-adulation shone the spotlight on ordinary citizens. 

"It is the people who are making America great again," he said, playing on his 2016 campaign slogan.

Near the end of the speech, as he talked about the nuclear threat of North Korea — which has escalated under his watch amid heated rhetoric — Trump singled out the tragedy of Otto Warmbier, the University of Virginia student who was detained in North Korea and died just after returning home to the United States. In one of the evening's emotional high points, Trump singled out Warmbier's parents, who sat teary-eyed in the gallery, as "powerful witnesses to a menace that threatens our world."

Though he did not use "Little Rocket Man," his provocative nickname for North Korean leader Kim Jong Un, he spoke with toughness and resolve about the threat across the Pacific.

"We need only look at the depraved character of the North Korean regime to understand the nature of the nuclear threat it could pose to America and to our allies," he said.

Trump did not mention the Russia investigation, which is reaching a critical point that could include the president being called in for an interview with special counsel Robert S. Mueller III's team.

His gibes at critics and opponents were uncharacteristically gentle, some delivered through stories of individual Americans — such as the tale of 12-year-old Preston Sharp, who headed a drive to place flags on veterans' graves.

"Preston's reverence for those who have served our nation reminds us why we salute our flag, why we put our hands on our hearts for the Pledge of Allegiance and why we proudly stand for the national anthem," Trump said, an apparent reference to the controversy over black pro football players kneeling during the anthem in protest of police violence.

Trump generally strives to appear presidential when delivering major speeches. He embraces such traditional moments, complete with all the pomp and circumstance that he came to appreciate during his years as a reality television producer, and relishes the positive reviews that such appearances receive.

Aides describe a conventional speechwriting process. White House Chief of Staff John F. Kelly, policy adviser Stephen Miller, staff secretary Robert Porter and other advisers helped organize the policy priorities, while a team of White House speechwriters drafted sections — with Trump making edits with a black felt-tip pen. He impressed upon his staff how much he wanted the language to be unifying.

"He is the president of all Americans, including the millions who didn't vote for him," said presidential counselor Kellyanne Conway.

But after these occasional episodes of dignified orthodoxy, it usually is only a matter of days, or even hours, before he says something — often in a blistering tweet — to change the subject. Again and again, Trump's personal attacks or divisive pronouncements have wiped away whatever aura of statesmanship he created by reading speeches from teleprompters.

Last February, for instance, his soaring speech to a joint session of Congress about "American renewal" was widely applauded. But within a few days, he created a storm of controversy by accusing — without evidence — his predecessor, former president Barack Obama, of a Nixonian plot to have the "wires tapped" at Trump Tower during the 2016 campaign.

Tuesday night, the House chamber became a stage for the political plotlines that have defined American politics in the year since Trump took office.

Missing from the audience on the House floor were more than a dozen Democratic lawmakers, disproportionately members of the Congressional Black Caucus, who had announced in advance that they would boycott in protest of Trump's words and actions.

"He does not respect me or the communities I represent, so I cannot in good conscience sit idly on the House floor and listen to his scripted speech," Rep. Gregory W. Meeks (D-N.Y.) tweeted.

Meanwhile, female Democratic lawmakers wore black in solidarity with the #MeToo and #TimesUp movements that have emerged amid headlines about sexual assault by famous and powerful men.

In this setting, however, they were making an additional point — issuing a reminder that, during the 2016 campaign, Trump himself was accused of sexual misconduct by more than a dozen women and was elected nevertheless.

Members of Congress also made statements in their choice of guests they invited to watch Trump's speech from the galleries of the chamber, from survivors of the opioid epidemic to victims of gun violence.

David A. Fahrenthold and Sean Sullivan contributed to this report.