President Trump stuck to the script, and G.O.P. orthodoxy, in a speech to Congress that laid out a broad agenda but few specifics

trump4-kXzH--420x236@abc-HomeWASHINGTON — President Trump signaled a new openness on Tuesday to granting legal status to millions of undocumented immigrants who have not committed serious crimes, and he then called on Congress to work with him on overhauling health care, changing the tax code and rebuilding the nation’s infrastructure and military.

In an address to a joint session of Congress in which he defended the tumultuous early days of his presidency, Mr. Trump said he was eager to reach across partisan lines and put aside “trivial fights” in the interest of helping ordinary Americans. But even as he outlined a bold agenda, he was raising new questions about his own policy priorities and how he planned to achieve them.

Mr. Trump broke from his tough immigration stance in a conversation with news anchors just hours before he spoke and said he was open to a the kind of broad overhaul that many Republicans and some of his core supporters have derided as “amnesty.

“The time is right for an immigration bill as long as there is compromise on both sides,” the president told the TV anchors at the White House, according to people present during the discussion. Those present requested anonymity because they were not authorized to speak about the private meeting.

The idea is a sharp break from the broad crackdown on immigrants in the country illegally that Mr. Trump ordered in his first weeks in office and the hard-line positions embraced by his core supporters that helped sweep him into the White House.

But Mr. Trump made only glancing reference to a broad immigration overhaul in his speech, calling for a new “merit-based” system that only admits those able to support themselves financially, and never mentioning legalization of undocumented people. Overall, his speech held to the tough-on-immigration theme that marked his campaign.

“As we speak, we are removing gang members, drug dealers and criminals that threaten our communities and prey on our citizens,” Mr. Trump said. “Bad ones are going out as I speak tonight and as I have promised.”

In contrast with the dark themes of his inaugural address, Mr. Trump’s speech to Congress was a more optimistic vision of America and what he called the promises ahead. The themes were largely Republican orthodoxy, delivered soberly and almost verbatim from a prepared text. Mr. Trump read from Teleprompters and appeared restrained and serious.

Republicans interrupted dozens of times with standing ovations while Democrats mostly sat stone-faced. Mr. Trump presented himself as eager to put aside the vitriol of his campaign and his presidency — a message at odds with his time in office so far.

“The time for small thinking is over, the time for trivial fights is behind us,” Mr. Trump said. “From now on, America will be empowered by our aspirations not burdened by our fears.”

The most emotional moment of the speech came when Mr. Trump recognized Carryn Owens, the widow of William Ryan Owens, a Navy SEAL who was killed during a commando raid that the president authorized in Yemen. Ms. Owens sobbed as Mr. Trump said, “Ryan’s legacy is etched into eternity.” Earlier in the day, Mr. Trump, who had been criticized for the raid, blamed Mr. Owens’s death on “the generals” who oversaw the mission.

The speech opened a new phase in a presidency that has so far been defined by unilateral actions and pronouncements and reflected Mr. Trump’s need for cooperation in Congress.

“My administration wants to work with members in both parties to make child care accessible and affordable, to help ensure new parents have paid family leave, to invest in women’s health, and to promote clean air and clean water and rebuild our military infrastructure,” Mr. Trump said.

He laid out the broad outlines of a health care overhaul that papered over divisions among Republicans about how to structure it, calling for a plan that use tax credits and tax-advantaged savings accounts to help Americans purchase insurance, and promising a “stable transition” from the existing system.

Privately just hours before, Mr. Trump had suggested a move toward a comprehensive immigration overhaul that would be a dramatic turnaround. Mr. Trump, whose campaign rallies rang with shouts of “build the wall!” on the Mexican border, signed an executive order in January directing the deportation of any unauthorized immigrants who have committed a crime — whether or not they have been charged or convicted — or falsified a document. The standard could apply to virtually any one of the estimated 11 million people in the country illegally.

Hours before the speech, Mr. Trump went so far on Tuesday as to raise the idea of granting citizenship to young undocumented immigrants brought to the United States as children, one person present said. Such a change would go well beyond the temporary work permits President Barack Obama offered them through a 2012 executive order.

During his campaign, Mr. Trump criticized Mr. Obama’s directive as an “illegal amnesty,” and promised he would immediately end the program if elected. But he has delayed acting on the matter since taking office and expressed sympathy for its beneficiaries, sometimes known as Dreamers.

The White House did not dispute Mr. Trump’s remarks to the television anchors, but Sarah Huckabee Sanders, the deputy press secretary, said she had not witnessed the conversation so was unable to confirm it.

“The president has been very clear in his process that the immigration system is broken and needs massive reform, and he’s made clear that he’s open to having conversations about that moving forward,” Ms. Sanders said. “Right now, his primary focus, as he has made over and over again, is border control and security at the border and deporting criminals from our country, and keeping our country safe, and those priorities have not changed.”

The president’s remarks about immigration came the day before Mr. Trump was to issue a new version of his executive order banning travel to the United States from seven predominantly Muslim countries and suspending the acceptance of refugees. The ban has been revised because of legal challenges.

Mr. Trump, appearing in the well of the House, used his speech to defend that order and the rest of his record of the past tumultuous 39 days.

“It is not compassionate, but reckless, to allow uncontrolled entry from places where proper vetting cannot occur,” Mr. Trump said. “Those given the high honor of admission to the United States should support this country and love its people and its values. We cannot allow a beachhead of terrorism to form inside America — we cannot allow our nation to become a sanctuary for extremists.”

The speech also reflected the war Mr. Trump is fighting with himself and his inner circle. Even as Mr. Trump held out the possibility of legal status for millions of undocumented immigrants, Melania Trump, the first lady, was hosting the families of victims of violent crime by such immigrants — a way of highlighting Mr. Trump’s belief that immigrants who lack legal status pose a grave threat to Americans and should be feared and removed, not embraced.

Mr. Trump has yet to propose major legislation to achieve his goals, with members of his cabinet and senior staff divided over key elements of tax and health plans and congressional Republicans split on how to structure them. By this point in his presidency, Mr. Obama had established an active — if not always friendly — working relationship with a Democratic Congress, having signed into law a $787 billion package of spending and tax cuts intended to stabilize the economy.

Democrats said Mr. Trump was making grandiose promises without laying out specific steps for achieving them, and doubling down on steps they argued had harmed Americans.

Senator Chuck Schumer of New York, the top Democrat, argued that Mr. Trump’s address was “far less important than past presidential addresses, because his speeches don’t indicate what he’s actually going to do.”

To write the speech, Mr. Trump turned to the top advisers who helped develop his inaugural address: Stephen Miller, his senior policy adviser, and Stephen K. Bannon, his chief strategist. The two were still working on the speech late Monday, aides said.

Mr. Miller and Mr. Bannon, both architects of the president’s tough immigration policies, were responsible for shaping the dark themes of the president’s speech on Inauguration Day.

But White House officials said Mr. Trump wanted to offer a more positive vision for the country’s future in Tuesday’s congressional address. They said the president drew inspiration for the speech from the frequent “listening sessions” he held at the White House in recent days with health care officials, law enforcement officers, coal miners, union representatives and others.