The release this week of three American men who had been held in captivity in North Korea was the most significant foreign policy accomplishment of President Trump’s administration. The plight of the three men rose to national attention only fairly recently, a function of their becoming integrated into the United States’ desired outcomes from a thawing of the relationship between our two countries.

Trump saw the release of the prisoners as a significant victory, particularly in contrast to his predecessor in the White House.

That is not exactly a fair comparison. Two of the three men released Thursday morning were only arrested after Trump took office.

Americans being held against their will overseas are often incorporated into political fights. That includes fights with the two countries that have been central to Trump’s foreign policy efforts over the past several weeks, Iran and North Korea.

The most famous hostage standoff with Iran began in November 1979, when 52 Americans were captured after supporters of Ayatollah Ruhollah Khomeini overran the U.S. embassy in Tehran. That situation was resolved on Jan. 20, 1981 — the day Ronald Reagan was inaugurated as president.

In recent years, there have been a number of other people held as prisoners by the Iranian government. That is an important distinction: The graphic above combines both those being held by foreign governments and those taken hostage by non-state actors like terrorists. When Iran arrested three Americans who were hiking near the Iranian border in 2009, they fell into the former category. One was released in 2010, the other two in 2011.

In January 2016, four people being held prisoner by the Iranian government on a number of different charges were released, including The Washington Post reporter Jason Rezaian. (One, Nosratollah Khosravi, is something of a mystery.)

There are still several Americans imprisoned in Iran or believed to be imprisoned in Iran. CNN has a good breakdown of those currently being held. Among them is Robert Levinson, detained in 2007 while apparently (but disputedly) on a mission for the CIA. Iran has never acknowledged having arrested him.

North Korea has detained a number of Americans in recent years, including the three released on this week. In 2009, the country held journalists Laura Ling and Euna Lee for several months until former president Bill Clinton negotiated for their release. The most controversial detention was that of student Otto Warmbier, who was released last year after suffering injuries in captivity that soon led to his death. Warmbier’s parents were guests of Trump’s at this year’s State of the Union address.

Many of those held captive in the past 10 years were captured by terrorist groups like al-Qaeda and the Islamic State. Several hostages have been killed, often brutally, by these groups, including journalists James Foley (who was detained on two separate occasions) and Daniel Pearl of the Wall Street Journal. In 2012, journalist Austin Tice went missing in Syria. It is not known if he is alive.

A decade ago, another terror group released two Americans who had been held in captivity for over five years. That was FARC, the Colombian guerrilla movement aimed at overthrowing that nation’s government. (It signed a peace agreement with the government last year and disbanded.)

The American hostage known to have spent the most time in detention was journalist Terry Anderson. Anderson spent over six years in captivity in Lebanon in the 1980s and early 1990s. There were a spate of hostage-takings in Lebanon at the time. Anderson, like many of those detained or taken hostage mostly for political purposes was released unharmed. William Higgins, a Marine colonel aiding a peacekeeping mission in the country in 1988, was captured and murdered.

Part of the reason foreign governments and terror groups seize prisoners is precisely to gain leverage over the United States. That three prisoners were released from North Korea is very good news. It is worth remembering, though, it also helped North Korean leader Kim Jong Un position himself as reaching out to the United States — by undoing a hostile action he undertook against U.S. citizens in the first place.