After the recent attacks on Saudi oil facilities, President Trump suggested that the defense relationship with Riyadh meant that the United States might come to its aid — and authorized a small U.S. troop deployment to the kingdom. Earlier this month, Trump tweeted that he was discussing with Israeli Prime Minister Benjamin Netanyahu the possibility of a formal U.S.-Israel defense treaty.

Does it matter that neither Israel nor Saudi Arabia is a formal U.S. treaty ally? Yes. Here’s why.

In its early years, America steered clear of alliances

Between the Revolutionary War and the early Cold War period, the United States made formal military alliances only when it believed America’s survival required it, forming only two defense pacts in the fight for its independence from the British and during World War II.

World War II prompted a radical change in the U.S. approach to its peacetime international relations. Postwar planners came to believe that the country could no longer depend on its favorable geography. Instead, the United States needed a strategy of forward defense to meet threats overseas — namely, the Soviet Union, China and North Korea.

Between 1948 and 1955, the formerly alliance-phobic Washington formed security guarantees with 23 countries in Europe and Asia, with the logic that these alliances could help Washington deter and defend against conflicts overseas. These included NATO, SEATO and pacts with Japan, South Korea, the Republic of China, the Philippines, Australia and New Zealand.

By the dawn of the 21st century, the United States had allied with 37 countries in all. Each of these guarantees relies on a mutual defense treaty: a formal pact that states that an attack against an ally will be treated as an attack on all or treated as a threat to the peace and security of all.

The exact treaty language varies somewhat across America’s alliances, but the substantive promises are similar. In no case does Washington guarantee that it will respond militarily to the use of military force against an ally. Rather, by formalizing the defense relationship in a treaty, and reinforcing that alliance with other forms of defense coordination, a mutual defense treaty raises the possibility that allies and adversaries both believe that the United States will come to the (military) aid of its formal alliance partners. Strategists call this extended deterrence — the United States forestalling an attack on another country via assurances to a formal treaty ally.

As I assess in my forthcoming book, “Shields of the Republic,” this alliance system has an impressive record: No U.S. treaty ally has ever been the victim of a major attack. It is hard to say for certain that this is because of extended deterrence, but it is plausible that alliances have played some causal role.

Declining to make a formal alliance also means something

Over the same period, Washington has also formed other defense partnerships that do not rely on mutual defense treaties with countries such as Israel and Saudi Arabia. With Taiwan, the United States abrogated a formal alliance in 1979 and replaced it with the Taiwan Relations Act. These partnerships may rely on arms sales, intelligence coordination and close political relationships, but by definition, they send weaker signals than treaty alliances. Where policymakers have chosen to codify alliances in treaties, they have, by definition, set this class of allies apart from other partnerships.

This distinction is reinforced by the fact that U.S. policymakers have also chosen not to form mutual defense treaties. Over the years, U.S. strategists have considered extending formal alliances to Israel and Saudi Arabia, and then decided against it. From 1961 to 1963, the Kennedy administration knew that Israel had begun a quest for nuclear weapons and seriously considered extending Israel a formal treaty guarantee to persuade it to give up its pursuit. Shortly before his assassination, John F. Kennedy and his top aides decided this was too dangerous: They worried that Israel would drag the United States into a war with Egypt, which Washington did not really count as an adversary at the time.

Without considering a full mutual defense treaty, the Obama administration also sought to elevate the status of its partnership with Saudi Arabia and other Persian Gulf states, acknowledging that a formal alliance would be too fraught.

It’s the partnerships, not the formal alliances, that tend to entangle the United States

How U.S. policymakers choose allies may help to explain why Washington’s pacts have been successful. Despite the common scholarly criticism that allies are “reckless drivers,” America’s treaty allies do not tend to pull it into unwanted wars.

This is probably because policymakers are so choosy. Where they have worried that new allies might ensnare it in conflict, they have crafted their alliance promises to limit that prospect and have used the alliance itself to manage risk. When the United States has followed other countries into wars or crises, these have generally been security partners and not formal allies — perhaps because the less formal relationship sends murkier signals, making it harder to deter adversaries and restrain partners.

The U.S. has been cautious with its formal alliance offers lately

With the exception of its post-Cold War NATO enlargement process, the United States has not extended a new formal alliance since 1955. It is a somewhat unlikely move — alliance treaties require two-thirds ratification by the U.S. Senate, and political polarization makes formal treaties ever-harder to achieve.

There is overwhelming bipartisan support for Israel in Congress, however. Although the president’s tweet may have been a ploy to assist Netanyahu ahead of a tough Israeli election, it’s difficult to count out the prospect that he could be serious — and that Congress might support him.

Saudi Arabia’s chances of a formal alliance are less promising, as the Senate remains suspicious of Riyadh’s role in the gruesome murder of journalist Jamal Khashoggi.

An alliance with Israel might not necessarily induce the same caution we have seen from existing U.S. treaty allies. The country has become increasingly nationalist and more inclined to court escalation. Simply bringing Israel into a formal alliance would not necessarily give Washington sufficient control over its defense decisions.

Historically, the Senate has given new alliance treaties serious scrutiny, but once a treaty is ratified, the president retains near-unilateral authority in alliance management. If Trump’s interest in a mutual defense treaty with Israel lasts, Congress may well decide to evaluate its risks.

For Saudi Arabia, the troop deployment is a reminder that the United States can become entangled by partners — even well short of a security guarantee.

Mira Rapp-Hooper is Stephen A. Schwarzman Senior Fellow for Asia Studies at the Council on Foreign Relations. Her first book, Shields of the Republic: Triumph and Peril in America’s Alliances is forthcoming with Harvard University Press.