IN THE desert 220km (137 miles) from Abu Dhabi, the capital of the United Arab Emirates (UAE), a South Korean firm is close to finishing the Arab world’s first operational nuclear-power reactor. The project started ten years ago in Washington, where the Emiratis negotiated a “123 agreement”. Such deals, named after a clause in America’s export-control laws, impose tough safeguards in return for American nuclear technology. When the UAE signed one in 2009, it also pledged not to enrich uranium or reprocess spent fuel into plutonium. Both can be used to make nuclear weapons. Arms-control wonks called it the gold standard of 123 deals.

Saudi Arabia only wants bronze. The kingdom has its own ambitious nuclear plans: 16 reactors, at a cost of up to $80bn. But, unlike the UAE, it wants to do its own enrichment. Iran, its regional rival, is already a step ahead. The most controversial provision of the nuclear deal it signed with world powers in 2015 allows it to enrich uranium. Iran did agree to mothball most of the centrifuges used for enrichment, and to process the stuff only to a level far below what is required for a bomb. Still, it kept the technology. The Saudis want to have it, too.

Lawmakers in Washington are worried. Granting the Saudis such a deal could prompt other countries, such as the UAE, to ask for similar terms. It may undermine global efforts at non-proliferation. Indeed, critics of the Iran deal fear that a Saudi enrichment programme would compromise their effort to impose tighter restrictions on Iran. But Donald Trump, America’s president, is less concerned. He has close ties with the Saudis. He has also pledged to revitalise America’s ailing nuclear industry. Among the five firms bidding for the Saudi project is Westinghouse, an American company that filed for bankruptcy last year. It would not be able to join the project without a 123 agreement.

Even some critics of the proposed deal concede that it may be the least bad option, because it would give America influence over the Saudi programme. The kingdom has other suitors. One is Rosatom, Russia’s state-owned nuclear-power company, which is pursuing a frenetic sort of nuclear diplomacy in the Middle East. In December it signed a $21.3bn contract to build Egypt’s first power reactor. Jordan inked a $10bn deal with the Russians in 2015. Despite their differences, particularly over Syria, the Saudis are keen to have closer ties with the region’s resurgent power. King Salman spent four days in Moscow in October, the first such visit by a Saudi ruler.

Yet nuclear energy does not make much economic sense for the kingdom. Saudi Arabia burns 465,000 barrels of oil per day for electricity, forgoing $11bn in annual revenue. But the last nuclear reactors will not go online until the 2030s. They will generate less than one-sixth of the 120 gigawatts needed during periods of peak demand. In a country with vast deserts, it would make more sense to use gas and invest in solar energy. Today the kingdom generates almost none: its largest solar farm, at the headquarters of the state oil company, powers an office building.

The government is building a solar-panel factory near Riyadh, the capital. On February 6th ACWA Power, a Saudi firm, announced that it had won the contract for a new 300-megawatt solar farm in the northern desert. ACWA promises to produce electricity for 2.3 cents per kilowatt-hour, a record-low tariff. Though costs for nuclear power vary with reactor design, even the most efficient ones are more expensive. And whereas nuclear is a mature technology, costs for solar fall each year.

For the Saudis, though, a nuclear programme is a way to keep pace with Iran. It is also a step towards nuclear proliferation in the world’s most volatile region.