For the past forty years, tens of thousands of Moroccan soldiers have manned a wall of sand that curls for one and a half thousand miles through the howling Sahara. The vast plain around it is empty and flat, interrupted only by occasional horseshoe dunes that traverse it. But the Berm, as the wall is known, is no natural phenomenon. It was built by the Kingdom of Morocco, in the nineteen-eighties, and it’s the longest defensive fortification in use today—and the second-longest ever, after China’s Great Wall. The crude barrier, surrounded by land mines, electric fences, and barbed wire, partitions a wind-blasted chunk of desert the size of Colorado known as the Western Sahara. Formerly a Spanish colony, the territory was annexed by its northern neighbor, Morocco, in 1975. An indigenous Sahrawi rebel group, called the Polisario Front, waged a guerrilla war for independence. In 1991, after sixteen years of conflict, the two sides agreed to a ceasefire. The wall keeping the foes apart stretches from the Atlantic Ocean to the mountains of Morocco, roughly the distance from New York City to Dallas.

Late last year, I visited the Berm from the Polisario side, to the east, accompanying a handful of supporters of the group from around the world. Until we were about a hundred feet away, I didn’t sense that I was anywhere in particular in the expanse of the desert. My Polisario guide pointed out painted rocks indicating a minefield ahead. A few feet away, an unexploded mortar shell lay in the sand. We walked into a United Nations-controlled buffer zone and the Berm appeared in front of us, rising about six and a half feet behind a barbed-wire fence. I glanced left and right. The wall seemed to stretch endlessly, almost into the blue sky.

As we approached one of the tent-topped fortifications that dot the length of the Berm, a handful of Moroccan soldiers began to scurry around inside. “Will they shoot?” I asked one the Polisario guides. We could see the peaks of the soldier’s flat caps. “No, no,” he replied, laughing. He said that Sahrawis often demonstrate in front of the wall, demanding that Morocco leave the territory. “They’re used to this.” Two women began to shout abuse at the soldiers about Morocco’s King Mohammed VI. “Mohammed, you asshole,” they screamed. “The Sahara is not yours.”

Today, Morocco controls the western eighty per cent of the disputed territory, and the Polisario (which stands for the Popular Front for the Liberation of Saguia el-Hamra and Río de Oro) occupies the rest. The Polisario movement initially began as an armed rebellion against Spanish occupiers. Today, the Polisario calls Western Sahara “Africa’s Last Colony,” asserts that Morocco has replaced Spain as colonizer, and accuses the kingdom of exploiting the territory’s resources. Negotiations have repeatedly stalled, making Western Sahara the site of one of the world’s oldest frozen conflicts. The Polisario’s self-declared Sahrawi Arab Democratic Republic is recognized by the African Union and Algeria, which has given the group military support for decades and currently hosts more than a hundred and seventy thousand Sahrawi refugees in squalid camps.

Women at a traditional festival at the Boujdour camp near Tindouf, in southern Algeria. Sahrawis try to keep traditions alive in the camps. Photograph by Nicolas Niarchos

Morocco has poured money into its side of the Berm, expanding cities and developing tourism. But the Polisario accuses the kingdom of filling the territory it controls with secret police and soldiers, and of violently suppressing free speech and pro-independence protests. Videos abound online of police roughing up Sahrawi protesters. Omar Hilale, the Moroccan Ambassador to the U.N., denied the accusations of human-rights abuses in the territory and blamed incidents of violence on unlawful protests. “You want to protest, you have to register—everywhere, even here in the United States,” he told me. Hilale pointed the finger at Algeria, which he said had sent trained rabble-rousers into Western Sahara. Morocco’s largest foreign backer is France, the country’s former colonial overlord, and the French and Moroccan leadership retain strong political, economic, and personal ties. French companies frequently use Moroccan firms to invest in Africa, where they are often unpopular due to their colonial and postcolonial history. Many French politicians keep lavish holiday homes in Morocco.

On December 5th, for the first time in six years, negotiations were held in an effort to initiate a resolution to the conflict. To the surprise of longtime observers, the talks proceeded civilly and the parties agreed to meet again in several months. Officials present told me that President Trump’s new national-security adviser, John Bolton, played an important role in getting the groups to the table. “John Bolton and the enormous engagement the Americans are now putting in helped a lot,” a senior official close to the talks told me. Some diplomats involved in the negotiations call the changes “the Bolton effect.”

At an event in Washington in mid-December, where the Trump Administration’s new Africa strategy was unveiled, Bolton told me that he was eager to end the conflict. “You have to think of the people of the Western Sahara, think of the Sahrawis, many of whom are still in refugee camps near Tindouf, in the Sahara desert, and we need to allow these people and their children to get back and have normal lives,” he said.

Bolton knows the conflict well. He worked on the U.N. peacekeeping mandate for the region in 1991, and, starting in the late nineties, he was part of a U.N. negotiation team, led by James Baker III, the former Secretary of State, which came close to brokering an agreement to hold an independence referendum in the Western Sahara. (The Polisario agreed to the proposal, but Morocco did not.) The conflict, Baker told me in an interview in Houston, “has not been handled well, and that’s why it continues to persist.”

Since Bolton’s appointment, in March, there has been a flurry of activity regarding the Western Sahara conflict at the U.N. and in the State Department. “There are two Americans who really focus a lot on the Western Sahara: one’s Jim Baker, the other’s me,” Bolton told me. “I think there should be intense pressure on everybody involved to see if they can’t work it out.” This spring, at the insistence of the U.S. and to the chagrin of Moroccan and French diplomats, the U.N. peacekeeping mandate for the Western Sahara was extended by only six months rather than a year. (Bolton has long contended that the U.N. peacekeeping mission there has prolonged the conflict by detracting from efforts to resolve the underlying issues.) In October, the mandate was renewed for another six months. “After twenty-seven years, I don’t get impatient on a daily basis,” Bolton told me. “I just get impatient when I think about it.”

Bolton has repeatedly accused Morocco of engaging in delaying tactics to stymie negotiations. He wrote, in 2007, “Morocco is in possession of almost all of the Western Sahara, happy to keep it that way, and expecting that de facto control will morph into de jure control over time.”

Many Moroccan observers believe that Bolton is sympathetic to the Polisario. “John Bolton has distinguished himself by taking positions that are openly close to those of the separatists,” Tarik Qattab wrote in a story, this spring, for the Moroccan news outlet Le 360, which reflects the views of the government. Moroccan officials have also mounted a concerted effort to curry favor with Trump and Bolton. In May, Morocco cut off diplomatic relations with Iran, one of Trump’s most bitter enemies. Then, in September, the Moroccan foreign minister claimed in an interview with the conservative Web site Breitbart that the Polisario was being provided military training and weapons by Hezbollah, an Iranian proxy. (Morocco gave no proof of these claims, and analysts told me that such a connection was highly unlikely.)