Major U.S. stock indexes popped earlier Tuesday amid new optimism about the U.S. and China ending an economic conflict that has led to tariffs on hundreds of billions of dollars in goods. On Monday, Treasury Secretary Steven Mnuchin said he expected high-level trade talks with Beijing to resume in two weeks.

"Hopefully we can reach an agreement that will be beneficial for both countries. But as I have made very clear I will not accept a bad deal for the American people," Trump said, prompting no reaction from the Chinese delegation watching.

Speaking to the United Nations General Assembly in New York, the president struck an optimistic tone about reaching agreements with Beijing and other major trading partners. While slamming China for what he called unfair trade practices, Trump appeared to downplay the importance of quickly striking a deal.

UNITED NATIONS — President Donald Trump said Tuesday he will not accept a "bad deal" in trade talks with China as the world's two largest economies renew their push to end an escalating trade war.

US President Donald Trump speaks during the 74th Session of the United Nations General Assembly at UN Headquarters in New York, September 24, 2019.

As fears grow about the trade war sapping economic growth around the world, Trump has repeatedly claimed it will not hurt the U.S. economy or consumers. On Friday, he insisted he wanted a "complete" deal rather than a partial one. The president said he does not think he needs to strike an agreement before the 2020 election.

In his remarks Tuesday, Trump argued that he has taken on a tilted global trade order that hurt American workers for decades. He argued the World Trade Organization needs "drastic change" to counter cheating from China and other nations.

"For years these abuses were tolerated, ignored or even encouraged," he said.

In a subdued speech peppered with nationalist rhetoric and criticism of multilateral organizations, Trump addressed several of his current foreign policy challenges. He put particular emphasis on Iran, which the U.S. and its allies have blamed for drone attacks on Saudi Arabia's largest oil processing facility.

While he called Iran's "repressive regime" one of the "greatest security threats facing peace-loving nations today," he maintained that he does not want armed conflict with Tehran. He said Iran's regime is "fueling the tragic wars in both Syria and Yemen." He added that the government is "squandering the nation's wealth and future in a fanatical quest for nuclear weapons and means to deliver them."

"We must never allow this to happen," he said.

Trump and Iranian President Hassan Rouhani have both said that they will not meet on the sidelines of the U.N. despite being in close proximity this week. Rouhani is slated to address the U.N. delegation on Wednesday.

On Friday, the Trump administration sanctioned Iran's central bank in retaliation for the attacks. The Pentagon then announced a deployment of U.S. forces to the Middle East.

"The president has approved the deployment of U.S. forces which will be defensive in nature and primarily focused on air and missile defense," Secretary of Defense Mark Esper said, adding that Saudi Arabia requested the support. "We will also work to accelerate the delivery of military equipment to the Kingdom of Saudi Arabia and the UAE to enhance their ability to defend themselves," he added.

Similarily, Esper reiterated that the United States does not seek a conflict with Iran and called on Tehran to return to diplomatic channels. He also said that there could be additional U.S. deployments if the situation were to escalate.

— CNBC's Jacob Pramuk contributed from CNBC's global headquarters.