The death of Saudi Arabia's King Abdullah, who passed away Friday due to complications from a lung infection, elicited a series of gushing tributes from American leaders. In his official statement, President Obama praised his "enduring contribution to the search for peace" in the Middle East. Secretary of State John Kerry called him a "man of wisdom and vision." Vice President Biden, meanwhile, announced he'd lead the American delegation to Saudi Arabia to mourn the king in person.

The warm praise of Abdullah, 90, came as little surprise. Saudi Arabia and the United States have been close allies for decades. But the effusive reaction to the king's death reveals an uncomfortable truth about Washington's relationship to the kingdom. Despite Riyadh's repulsive human rights record, unproductive role in regional security, and American advances in shale oil production, the United States needs Saudi Arabia more than ever.

But first, it's worth detailing why the American relationship with Saudi Arabia is so problematic. King Abdullah will be replaced by his half-brother, Salman, who has vowed to continue the "correct" policy of his predecessor. For the country's women, religious minorities, and political dissidents, this is bad news. Saudi Arabia is an absolute monarchy in which no opposition to the ruling family is tolerated. Those brave enough to call for religious pluralism are subject to lengthy prison sentences or state-sponsored violence. Two weeks ago, in a case that aroused international condemnation, the government lashed a Saudi blogger named Raif Badawi 50 times after he dared to defend atheism. Badawi is scheduled to be lashed a total of 950 more times and will serve a 10-year prison sentence for this offense.

Women, who comprise 42.5 percent of the kingdom's population, are essentially treated like children. Saudi Arabia's "guardianship" system requires them to seek male permission to travel, work, or leave the house; they also, famously, are not allowed to drive. King Abdullah did receive credit from International Monetary Fund head Christine Lagarde for his "discreet" improvement of women's lives in the country—more women than men now attend college there, and many have received scholarships to study overseas. But the kingdom's viciousness toward females extends even to the most privileged. Four of King Abdullah's 15 daughters have lived under house arrest for 13 years after publicly opposing the kingdom's policies toward women. Two have said they're running low on food.

Contrary to President Obama's statement, Saudi Arabia's role in brokering Middle Eastern peace has, at best, been unhelpful. King Abdullah bitterly opposed Washington's support of pro-democracy protesters in Egypt and urged President Obama to use force to preserve Hosni Mubarak's dictatorship. Since Abdel Fattah al-Sisi assumed the country's leadership in 2013, Riyadh has helped finance his brutal suppression of the country's Muslim Brotherhood. Saudi Arabia has also resisted the rise of Shiite movements in the region out of fear that Iran, its main rival, will gain influence. When Shiite protesters threatened the Sunni dictatorship in neighboring Bahrain, Saudi Arabia dispatched its military to suppress the uprising. Riyadh's support of Syrian rebels, too, has backfired: Islamic State fighters have benefited from Saudi money and weapons.

So why does the U.S. put up with Saudi Arabia? The simplest explanation, of course, is oil. The kingdom is the largest and most important producer in the Organization of Petroleum Exporting Countries (OPEC), the bloc that controls around 40 percent of the world's oil. Because the United States was until recently the world's top oil importer, an alliance with Saudi Arabia made geopolitical sense.

The recent shale oil boom in the U.S. has led Washington to hope that before long, its alliance with Riyadh won't be necessary. The U.S. now pumps more than 9 million barrels of oil per day, which almost matches the amount in Saudi Arabia. Observers project that in five years, the U.S. will get 80 percent of its oil from North and South America and will be mostly self-sufficient by 2035. The OPEC decision to not cut supply in response to falling oil prices signaled that the North American boom had fundamentally changed the commodity's global logic.

Saudi Arabia is well-positioned to survive a sustained drop in the price of oil, currently at $48.71 a barrel. Riyadh generally needs oil to trade at $80 a barrel in order to balance its budget. But with $750 billion stashed away in reserve, the kingdom faces little pressure to reduce supply and raise the price. In addition, Saudi Arabia and fellow OPEC members Kuwait and the United Arab Emirates have proved reserves of 460 billion barrels. The United States, by contrast, has proved reserves of just 10 billion—and the U.S. Energy Information Agency forecasts that American shale oil production will plateau in 2020.

Given the precarious health of King Salman, who is 79 and alleged to be suffering from dementia, the United States government may well find itself offering condolences to Saudi Arabia on the death of its ruler before much longer. When the time comes, don't expect the reaction to be any less effusive.