NEW YORK  -   US President Donald Trump has said his administration had accelerated negotiations to reach a political settlement in Afghanistan with groups, including the Taliban, and, as they make progress, would be able to reduce the American troop presence there.

“In Afghanistan, my administration is holding constructive talks with a number of Afghan groups, including the Taliban,” Trump said during his State of the Union address to Congress on Tuesday night. “As we make progress in these negotiations, we will be able to reduce our troop presence and focus on counterterrorism. We do not know whether we will achieve an agreement,” Trump said. “But we do know that after two decades of war, the hour has come to at least try for peace.” And then, he added, “We will indeed focus on counterterrorism.”

Trump made the comments while defending his plans for Afghanistan and Syria, which have met push back from Congress and the foreign policy establishment.

“As a candidate for president, I pledged a new approach. Great nations do not fight endless wars,” he said, to some applause in the chamber.

In December, Trump announced he would withdraw all 2,000 US troops from Syria, a decision that precipitated the resignation of James Mattis as Defence secretary and which was derided by lawmakers in both parties as premature. Earlier on Tuesday, Gen Joseph Votel, the top US commander in the Middle East, said Trump made the announcement without consulting him. The Senate also Tuesday afternoon approved 77-23 a bill that warns against a “precipitous” withdrawal in Syria and Afghanistan.

Trump also declared victory against the Islamic State in Iraq and Syria (ISIS) when he said in December that troops would be withdrawn from Syria. But on Tuesday night, he shifted a bit, stating that “virtually” all territory has been retaken from ISIS. “Now, as we work with our allies to destroy the remnants of ISIS, it is time to give our brave warriors in Syria a warm welcome home,” he said.

In Afghanistan, reports late last year said Trump was planning to halve the 14,000 US troops there. But no official announcement of a drawdown has come. Zalmay Khalilzad, the Trump administration’s special envoy for Afghanistan reconciliation, last week told The New York Times that talks with the Taliban in Qatar yielded a preliminary framework for a peace agreement. Khalilzad has stressed that there remains much work before a final agreement. But in general, the Taliban would agree under the proposed deal to not allow Afghanistan to be used by terrorists to plot attacks, which would allow the United States to withdraw from the country after the longest war in US history.”

Other parts of the president’s speech enjoyed much less of a consensus positive reaction from the lawmakers in the chamber.

Trump vowed to build a wall along the border with Mexico aimed at stopping illegal migration that is a source of a deep partisan divide, and said Democratic attempts at “ridiculous partisan investigations” could damage US prosperity.

He called illegal immigration “an urgent national crisis,” but stopped short of declaring a border emergency that would allow him to bypass Congress for wall funding. Instead, he urged Democrats and Republicans to find a compromise by the February 15 deadline.

During his speech, Trump announced the date and venue of his upcoming meeting with North Korean leader Kim Jong Un. He’s set to meet with Kim in Vietnam on February 27 and 28.

“As part of a bold new diplomacy, we continue our historic push for peace on the Korean Peninsula. Our hostages have come home, nuclear testing has stopped, and there has not been a missile launch in 15 months,” Trump said.

“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 with potentially millions of people killed,” Trump added. “Much work remains to be done, but my relationship with Kim Jong Un is a good one.”

Trump also expressed America’s solidarity with those opposing the socialist, authoritarian government of Nicolas Maduro in Venezuela. “We stand with the Venezuelan people in their noble quest for freedom — and we condemn the brutality of the Maduro regime, whose socialist policies have turned that nation from being the wealthiest in South America into a state of abject poverty and despair,” Trump said.

Meanwhile, Trump defended his administration’s decision to withdraw the US from a landmark Reagan-era nuclear treaty with Russia. “Decades ago the United States entered into a treaty with Russia in which we agreed to limit and reduce our missile capabilities,” Trump said. “While we followed the agreement to the letter, Russia repeatedly violated its terms. That is why I announced that the United States is officially withdrawing from the Intermediate-Range Nuclear Forces Treaty, or INF Treaty.”

Trump said that perhaps a new deal could be negotiated in the future.

The speech, which was delayed several weeks by the 35-day government shutdown, clocked in as the second-longest State of the Union in history, and the longest since President Bill Clinton’s speech in 2000.