By Warren P. Strobel and Michael R. Gordon–

This article is part of a Wall Street Journal guide comparing President Donald Trump and former Vice President Joe Biden on issues from climate change to health care and jobs.

WASHINGTON—President Trump and Democratic opponent Joe Biden have profound differences in key areas of U.S. foreign policy, but hold similar views about some major goals, including limiting troop deployments to the Middle East and Afghanistan.

Mr. Trump has aimed to highlight his foreign-policy credentials in the closing weeks of the 2020 campaign. In quick order, he has overseen peace agreements between Israel and two Gulf Arab states; helped launch Afghan peace talks; reduced troops in Iraq and Afghanistan; and pushed for a framework arms-control agreement with Russia.

Mr. Biden, with decades of international experience as a former senator and vice president, has criticized Mr. Trump for weakening U.S. alliances, strengthening ties to dictators and failing to curb Iran’s nuclear program after withdrawing from a 2015 accord negotiated when Mr. Biden was serving under President Obama.

Their view of alliances “is the greatest and most important difference between the candidates, even above their differing views on climate, Iranian nuclear programs, and maintaining minimal troop levels in Iraq, Syria and Afghanistan,” said retired Adm. James Stavridis, a former North Atlantic Treaty Organization commander.

U.S. Alliances

Mr. Biden wrote in the journal Foreign Affairs that Mr. Trump “has belittled, undermined, and in some cases abandoned U.S. allies and partners,” weakening America’s world standing.

The former vice president has signaled that he would close ranks with NATO allies. He has criticized Mr. Trump’s decision to withdraw nearly 12,000 troops from Germany and vowed to review the move. He has said he would rejoin global accords such as the Paris Agreement on climate change.

Mr. Trump has been skeptical of Washington’s post-World War II alliances, seeing NATO members as economic competitors who should pay significantly more for their own defense. He has pressed Japan and South Korea to pay more to reimburse the U.S. for its troop deployments in those countries. He filed notice to quit the Paris agreement last year, saying it unfairly penalized American workers.

Iran and North Korea

Messrs. Trump and Biden differ sharply on how to curtail Iran’s nuclear program. Mr. Biden favors returning to the 2015 Iran nuclear accord, on the condition that Tehran, too, abides by the agreement, whose uranium enrichment limits it breached after Mr. Trump’s decision to withdraw. Mr. Biden has said he would try to negotiate a tougher, follow-on accord but hasn’t spelled out details.

Mr. Trump would continue his campaign of maximum economic pressure. But his conditions for a new agreement—an end to all nuclear enrichment and an Iranian pullback in the region—have been rebuffed by Tehran.

North Korea has stopped meeting with U.S. negotiators, and neither candidate has publicly explained how they plan to induce Pyongyang to denuclearize. Mr. Biden has said he would coordinate with China and other nations to negotiate the elimination of North Korea nuclear weapons.

Mr. Trump held two summit meetings with North Korean leader Kim Jong Un, but failed to persuade Pyongyang to give up its nuclear arsenal and long-range missiles.

Russia and Arms Control

Both candidates say they favor arms control but have outlined different strategies.

Mr. Trump wants a nuclear framework agreement this year with Russia that would lay out in broad terms the goals of a future treaty covering all nuclear warheads and providing for stringent verification.

If Russia agrees, Mr. Trump would extend the New START treaty, which is set to expire in February. Mr. Trump’s longer-term demand is that China join a new treaty along with Washington and Moscow.

Mr. Biden says his goal is to reduce nuclear weapons’ role in U.S. military doctrine. He favors an extension of New START as a foundation for new arrangements.

Troop Deployments

Mr. Biden has said he would bring most U.S. troops home from Afghanistan and the Middle East, while focusing the mission on countering al Qaeda and Islamic State.

Mr. Trump has said he wants a complete withdrawal from Afghanistan. The number of troops, which totaled about 13,000 in February, is being cut to 4,300 by the fall.

Neither candidate has spelled out their longer-term plans for troops in Iraq and Syria.

Middle East

Relations with Saudi Arabia would be far cooler under a President Biden, if he adheres to his campaign rhetoric.

He has pledged to end U.S. arms sales to the kingdom and told the Council on Foreign Relations last year he would “order a reassessment of our relationship with Saudi Arabia,” citing its war in Yemen and the 2018 killing of journalist Jamal Khashoggi.

Mr. Trump strongly backs Saudi Arabia and its crown prince, Mohammed bin Salman, as a strategic ally against Iran. He brushed aside an intelligence finding that Prince Mohammed likely ordered Mr. Khashoggi’s death and vetoed congressional attempts to curb weapon sales to Riyadh.

Mr. Biden has long cast himself as a strong Israel supporter and promises to maintain its military edge. He has backed a two-state solution to the Israeli-Palestinian conflict and cautioned against Israeli annexation of portions of the West Bank.

Mr. Trump, who moved the U.S. embassy from Tel Aviv to Jerusalem in 2018, has proposed a Mideast peace plan that would give Israelis terms and territory they have long sought, while providing for a Palestinian state under conditions rejected by Palestinians.

China

Getting tough with China is among the few areas of bipartisan agreement in Washington. Despite that, both campaigns have released TV ads criticizing the other’s record. Mr. Trump and Mr. Biden each pledge a robust response to Beijing, although their methods differ.

Under Mr. Trump, what began as a trade war has morphed into a multifront confrontation, as Washington has cracked down on Chinese espionage, sanctioned its high-tech companies and retaliated for its moves to end Hong Kong’s autonomy.

Mr. Biden says he agrees on the challenge China poses and has called Mr. Xi a “thug.” But he has called Mr. Trump’s trade war “erratic” and emphasized the need to coordinate an allied response to Beijing’s trade practices.