President Donald Trump turns to House speaker Nancy Pelosi of Calif., as he delivers his State of the Union address to a joint session of Congress on Capitol Hill in Washington, as Vice President Mike Pence watches, Tuesday, Feb. 5, 2019. (AP Photo/Andrew Harnik)

WASHINGTON — Face to face with emboldened Democrats, President Donald Trump called on Washington to cast aside “revenge, resistance and retribution” and end “ridiculous partisan investigations” in a State of the Union address delivered at a vulnerable moment for his presidency.

Trump appealed Tuesday night for bipartisanship but refused to yield on the hard-line immigration policies that have infuriated Democrats and forced the recent government shutdown. He renewed his call for a border wall and cast illegal immigration as a threat to Americans’ safety and economic security.

Trump accepted no blame for his role in cultivating the rancorous atmosphere in the nation’s capital, and he didn’t outline a clear path for collaborating with Democrats who are eager to block his agenda. Their opposition was on vivid display as Democratic congresswomen in the audience formed a sea of white in a nod to early 20th-century suffragettes.

Trump is staring down a two-year stretch that will determine whether he is re-elected or leaves office in defeat. His speech sought to shore up Republican support that had eroded slightly during the recent government shutdown and previewed a fresh defense against Democrats as they ready a round of investigations into every aspect of his administration.

“If there is going to be peace and legislation, there cannot be war and investigation,” he declared. Lawmakers in the cavernous House chamber sat largely silent.

Looming over the president’s address was a fast-approaching Feb. 15 deadline to fund the government and avoid another shutdown. Democrats have refused to acquiesce to his demands for a border wall, and Republicans are increasingly unwilling to shut down the government to help him fulfill his signature campaign pledge. Nor does the GOP support the president’s plan to declare a national emergency if Congress won’t fund the wall.

Wary of publicly highlighting those intraparty divisions, Trump made no mention of an emergency declaration in his remarks. He did offer a lengthy defense of his call for a border wall, declaring: “I will build it.” But he delivered no ultimatums about what it would take for him to sign legislation to keep the government open.

“I am asking you to defend our very dangerous southern border out of love and devotion to our fellow citizens and to our country,” he said, painting a dark and foreboding picture of the risks posed to Americans by illegal immigration.

The 72-year-old Trump harkened back to moments of American greatness, celebrating the moon landing as astronaut Buzz Aldrin looked on from the audience and heralding the liberation of Europe from the Nazis. He led the House chamber in singing happy birthday to a Holocaust survivor sitting with first lady Melania Trump.

“Together, we represent the most extraordinary nation in all of history. What will we do with this moment? How will we be remembered?” Trump said.

The president ticked through a litany of issues with crossover appeal, including boosting infrastructure, lowering prescription drug costs and combating childhood cancer. But he also appealed to his political base, both with his harsh rhetoric on immigration and a call for Congress to pass legislation to prohibit the “late-term abortion of children.”

Trump devoted much of his speech to foreign policy, another area where Republicans have increasingly distanced themselves from the White House. He announced details of a second meeting with North Korea’s Kim Jong Un, outlining a Feb. 27-28 summit in Vietnam.

Trump and Kim’s first summit garnered only a vaguely worded commitment by the North to denuclearize. But the president said his outreach to Pyongyang had made the U.S. safer.

“If I had not been elected president of the United States, we would right now, in my opinion, be in a major war with North Korea,” he said.

As he condemned political turmoil in Venezuela, Trump declared that “America will never be a socialist country” — a remark that may also have been targeted at high-profile Democrats who identify as socialists.

The president was surrounded by symbols of his emboldened political opposition. House Speaker Nancy Pelosi, who was praised by Democrats for her hard-line negotiating during the shutdown, sat behind Trump as he spoke. And several senators running for president were also in the audience, including Sens. Kamala Harris of California and Cory Booker of New Jersey.

Another Democratic star, Stacey Abrams, delivered the party’s response to Trump. Abrams narrowly lost her bid in November to become America’s first black female governor, and party leaders are aggressively recruiting her to run for U.S. Senate from Georgia.

Speaking from Atlanta, Abrams calls the shutdown a political stunt that “defied every tenet of fairness and abandoned not just our people, but our values.”

Trump’s address amounted to an opening argument for his re-election campaign. Polls show he has work to do, with his approval rating falling to just 34 percent after the shutdown, according to a recent survey conducted by The Associated Press-NORC Center for Public Affairs Research.

One bright spot for the president has been the economy, which has added jobs for 100 straight months.

“The only thing that can stop it,” he said, “are foolish wars, politics or ridiculous partisan investigations” — an apparent swipe at the special counsel investigation into ties between Russia and Trump’s 2016 campaign, as well as the upcoming congressional investigations.

The diverse Democratic caucus, which includes a bevy of women, sat silently for much of Trump’s speech. But they leapt to their feet when he noted there are “more women in the workforce than ever before.”

The increase is due to population growth — and not something Trump can credit to any of his policies.

The president also defended his decisions to withdraw U.S. troops from Syria and Afghanistan over the opposition from national security officials and many Republican lawmakers.

“Great nations do not fight endless wars,” he said, adding that the U.S. is working with allies to “destroy the remnants” of the Islamic State group and that he has “accelerated” efforts to reach a settlement in Afghanistan.

IS militants have lost territory since Trump’s surprise announcement in December that he was pulling U.S. forces out, but military officials warn the fighters could regroup within six months to a year of the Americans leaving. Several leading GOP lawmakers have sharply criticized his plans to withdraw from Syria, as well as from Afghanistan.

Trump’s guests for the speech included Alice Marie Johnson, a woman whose life sentence for drug offenses was commuted by the president, and Joshua Trump, a sixth-grade student from Wilmington, Delaware, who has been bullied over his last name. They sat with Mrs. Trump during the address.