I lived in Beirut 10 years ago. When I returned this spring, I went on long walks through the city to reorient myself. What is going on here? What is happening? What phase of history am I looking at? I tried to feel the pulse of the city, throbbing through the honking traffic, to measure the hopes of the construction cranes on the skyline against the number of army checkpoints. How is it possible, I kept asking my friends, that you guys are apparently—pause for an ironic eyebrow lift—well, a bit, relatively, stable? The horror of the civil war next door in Syria shows no sign of abating; refugees are still coming over the border to join over one million of their displaced compatriots. Beirutis shrugged, laconic. Somehow, they would say, it’s in everyone’s interest (Syrians, Saudis, Iranians, Turks: those power-pushing regimes who play with the country as geopolitical leverage) to keep Lebanon a safe space this week. To invest and recycle cash, buy things and sell things, eat and drink, make deals and negotiate… For the Lebanese I think, sometimes, peace just feels like a period of uncertainty between wars.

In the meantime, the Lebanese do what they have always done: build. My walking tours were parkour, hopscotch, detouring around building sites, dashing across highways with no pedestrian crossings, backing out of blind alleys, climbing up staircases set in hillsides or over wasteground banks overrun with rosemary and nasturtium. Everywhere the clanging and banging of construction—construction everywhere. Beirut is built on green mountains that fall into the Mediterranean. From the high suburbs, the centre appears dense, dun-coloured and spiked with towers. It looks as if the Lebanese have tipped a bucket of concrete over the most beautiful place in the world.

Cities reflect societies and the people who live in them. Urban landscapes grow into their physiognomy in the same way that faces are etched by personality and experience. In New York the upward thrust of the Sixth Avenue skyscrapers proclaim the American dream. Jerusalem is a city of serried levels, where a walkway-roof opens into a covered market overlooking a garden path that leads down a spiral stone staircase, abutting and overlapping like the layers of history. Take a taxi in Tehran up the mountain the city is built on, and travel from the poor suburbs of the Islamic Republic to the more rarefied climes of Persia.

“All cities are an expression of a power relationship,” explains Michael Davie, a Lebanese geographer who works in France, at the University of Tours. “Lebanon was founded by—let’s call them semi-feudal elites—who used Beirut to accrue prestige and fortune. Today, the situation hasn’t changed.”

“The centre was badly bashed up by the fighting-but it was post-war development that bulldozed the place”

Lebanon’s civil war ended in 1990. But Beirut today is less of an effort to build a future than to pave over the past. Before the war, Downtown was where you met to drink coffee, do business, or go to the movies. The centre was badly bashed up by the fighting but it was post-war development that bulldozed the place. Hundreds of buildings were razed, tens of thousands of owners and tenants bought out and a pastiche of Beirut’s former glory was built in their place. A handful of French mandate buildings and Ottoman-era mosques were renovated, and a field of Roman ruins was excavated as sops to preservationists and future tourists (who never came). The area is now a collection of anodyne apartment and office blocks bordered by a row of skyscrapers along the seafront, blocking the view for anyone behind.

When I lived in Beirut this was still under construction, but it was clearly aimed at Gulf shoppers and not ordinary Beirutis. Only a few rich people would be sitting in the cafés, no one went to the restaurants and the shops were expensive international designers: Versace, La Perla, Christian Louboutin. This spring I was shocked to see the glitzy shopfronts were boarded up, the cafés were gone and the centre of Downtown, a starburst-shaped plaza restored to its exact pre-war state, was barricaded by razor-wire and sentry boxes. The Lebanese army waved people away: “No, not here, road closed.” The heart of Beirut is an empty shuttered shell surrounded by an impassable belt of highways. The failure of Downtown is the failure of the state.

No side won the civil war, which lasted 15 years and killed up to 250,000. It had multiple causes but one was sectarian: the country is deeply divided by religion, the main factions being Sunni, Shia, Maronite Christian and Greek Orthodox. The 1989 peace agreements were signed by a group of warlords who were tired of battle. But the sectarian power-sharing arrangements were only modified: the President must still be a Christian, the Prime Minister a Sunni, the Speaker of Parliament a Shia. The result is a triumvirate of dysfunction, negligence and corruption, and a political impasse. The office of president, a largely symbolic role, has technically been vacant for two years. From time to time, an assassination realigns enmities and alliances. Rafic Hariri, architect of the peace accords, later became prime minister but was killed by a truck bomb in 2005.

Hariri was a large and controversial character and his legacy looms over the city, politically, economically and architecturally. As prime minister he ignored any apparent conflict of interest and founded Solidere, the mostly private development company which repossessed Downtown through compulsory purchases and rebuilt it. But missing was any urban vision that tried to reunite a country riven by sectarian conflict. “No one was interested in discussing the city as a place for citizens,” Davie says.

The government, such as it was, seemed only to serve the interests (investment, speculation, property development) of the powers-that-be. The grand St George’s Hotel on the edge of Downtown remains a lone hold-out: a STOP SOLIDERE banner hangs from its ruined balconies. Its owners were rebuilding when the bomb that killed Hariri and 21 others blew up on the road outside. Parable, testament or cautionary tale: the hotel is still gutted and empty. Opposite stands a bronze statue of Hariri with bushy eyebrows and a bushy moustache, arm outstretched.

Beirut combines private affluence with public squalor. It’s a city with almost no public green space or parks. Recently, rubbish piled up for months over a dispute with collectors; the stench hung over even the swankiest districts. Beirutis are so inured to the electricity being off, as it is for hours each day, that there is an app to track the outages. Water is also chronically mismanaged. Most of Lebanon’s rainfall runs off the steep hills into the sea; the influx of Syrian refugees into a country of about five million people has stretched resources. Last summer there was a drought and farmers were told to stop watering their crops so often. Undrinkable water sputters through people’s taps.

On the corner of Damascus Road and Independence Street is the Yellow House, nicknamed for its facade of ochre stone. It was built for the Barakat family in the 1920s, a fine example of the neo-Ottoman style of this period. During the war, its location turned it into a snipers’ nest and its shattered, ruined elegance came to embody the violence. After the fighting was over, architect Mona Hallak campaigned to preserve it as a monument. When I saw it in May, it was a prosthetically-enhanced designer ruin, with industrial ironwork holding up amputated pillars and plate glass shielding the blasted-open facade from the street.

“The Yellow House is a mini-version of what has happened in the whole city,” sighed Hallak. She spent years convincing politicians to declare the building culturally important and take over ownership from the Barakat family, who wanted to develop the site. The municipal council is under Sunni control, but the governor is traditionally Greek Orthodox. “They have been opposing each other for the past 18 years,” said Hallak. Eventually the municipality engaged an architect and the refurbishment was recently finished. But Hallak is not happy. Some of the pocked facade has been smoothed over and fake bullet-holes poked in the plaster. “The architect killed the spirit of the place,” she said. The building was inaugurated by a small party of clapping officials in March, but it is not yet open to the public and a long way from the cultural space Hallak proposed.

In May, Hallak ran in the municipal council elections on the ticket of a new party, Beirut Madinati (Beirut My City). Lebanon’s first non-sectarian political party was born out of frustration with urban governance. “We could not believe that at one point we were almost eating our own garbage,” says Hallak. A group of technocrats, professionals, urban planners, actors and activists banded together in late 2015 and in a few short months launched a serious threat to existing power blocs.

The roots of popular discontent go back to 2005 and the Cedar Revolution. In the wake of Hariri’s assassination, tens of thousands of Lebanese gathered in Martyrs’ Square in the centre of Beirut. The demonstrators wanted an end to the occupation by Syrian troops, which began during the civil war, and of Syrian influence on the government. They succeeded in pushing out the Syrians but found it harder to shift the political status quo. Over the past few years, this demographic of activists and fed-up young people has turned its attention to local government.

The rubbish crisis, which began in mid-2015, gave rise to anti-government protests under the slogan “You Stink!” Thousands demonstrated next to parliament; the government’s response was to erect concrete barriers to stop them gathering.

This was the latest example of the trend to cordon off Beirut’s few public spaces, which is increasingly causing a backlash. Residents in the exclusive Christian neighbourhood of Ashrafiyeh managed to alter the route of a proposed highway that would have destroyed dozens of classic houses and gardens. Activists are fighting over the Daliyeh promontory, the last part of Beirut’s natural coastline that overlooks the famous Pigeon Rocks. A company connected to the Hariris wants to built hotels on the site and ordinary Beirutis who used to picnic there are now kept out with chain-link fences. During the You Stink! protests last year, Beirut’s governor was shamed into opening Horsh Park, which accounts for three-quarters of the city’s public green space and was closed—for no discernible reason—for 25 years. The park was open for several Saturdays; it has since shut again.

In the municipal elections, Beirut Madinati received 40 per cent of the vote. However, under the first-past-the-post electoral system, the alliance led by Said Hariri, Rafic’s second son, won all the council seats. Hallak still hopes they can capitalise on their popularity and push for reform. Davie said that he knew of grand old Sunni families who voted for the upstarts. “Even they are fed up with the Mafia system in Beirut. Nothing is working.”

Property prices in Beirut may not have ever fallen. Investors wait out political instability and market downturns. Developers continued to build throughout the civil war; all sorts of opportunistic illegal apartments went up. Sometime in the early 1990s, they discovered a legal loophole that allows buildings to be over 50m high. Shiny glass towers now rise all over the city. “Because they want to see the sea we can’t see the sky anymore,” read one poster at an anti-development demonstration.

“‘Because they want to see the sea we can’t see the sky anymore,’ read one poster against development”

On my walks I wondered at Beirut’s great jumble: the absurd juxtaposition of old and new, rich and poor. You can shop at a giant supermarket in the middle of a wide expanse of car park next to the dark fetid alleys of an old Palestinian refugee camp; sip cocktails at the industrial-chic Junkyard bar in the hipster artist area of Mar Mikhaël, visit the farmers’ market held every Saturday next to a Starbucks in the ghostly mall called “Beirut Souks.” I walked along the Corniche, the sweeping promenade along the seafront, Beirut’s only shared public space. There were teenagers doing wheelies on their motorbikes, devout couples getting to know one another and sharing candy floss or grilled corncobs, the last fisherman of the day puttering his boat into the harbour looked down on by the gods of the surrounding tall white apartment blocks. Syrian refugee families took the sea air or sat on the kerb and begged, kids dived into the sea off the rocks overseen by their older sisters in hijab, musclemen jogged along with iPods strapped to their biceps.

I walked up the hill away from the sea, craning my neck at the vertiginous glass skyscrapers. Many of them were built to launder money and their 500-square-foot million-dollar apartments are unsold. “The towers are a new phenomenon,” Davie told me. “Each building has become a gated community, there are guards, they check everyone’s ID.” Beirut’s development is further polarising its population—not by sect but by money.

I went past the campus of the American University in Beirut, to Hamra. Before the war, it was an upscale area centred around a smart shopping street. A decade ago, it was dilapidated, a couple of hole-in-the-wall bars flickering into life intermittently in the side streets. There was still a vestigial sense it was a mixed neighbourhood even though the streets were mostly full of girls in hijab, shopping for sparkly sandals and sipping milkshakes in the American-style fast food restaurants. Now there is a burgeoning theatre scene and it has become a place where different classes mix, or at least rub shoulders. Within a few blocks you can get a cheap shawarma or a cappuccino; a fancy quinoa salad or a hipster mezze. Syrians are opening restaurants and bringing the spice of Aleppan cuisine to the mix.

Cities evolve as history moves on and societies change. I began to notice some of the extraordinary buildings going up. Herzog & de Meuron, the Swiss firm which converted Bankside power station into the Tate Modern, are responsible for an irregular horizontally stacked apartment tower going up on the edge of Downtown. Soma Architects of New York are cantilevering an asymmetric 11-storey glass dome over a 1920s villa facade in Mar Mikhael. Bernard Khoury, Beirut’s most celebrated contemporary architect, deplored the banality of many of the towers, but told me: “I am not necessarily against vertical development… I still want to believe there are a few stupid romantics like me who can produce meaningful buildings.”

Khoury studied in the United States during the war and came back to Beirut in the 1990s, young and optimistic. Like most of his generation, he no longer believes that the city can regain its prewar place as the intellectual and cultural hub of the Middle East.

“Beirut was not rebuilt, it was redeveloped,” he told me. His first projects were provocative and challenging: war repurposed into entertainment, awkwardness all-knowing, beyond irony. He designed the BO18 nightclub in the shape of a submarine, set in an abandoned industrial area. You walked down into it from street level, entering it like a bunker or a coffin. You drank, you danced in the dark in the frenzy of techno music and flashing of strobe lights. It was curiously thrilling. In another of his designs, I left a crumbling street corner and got into an ovoid futuristic elevator as anomalous as a Tardis, arriving underground in a sushi restaurant called Yabani, a shiny white spaceship peopled with Beirut’s most glittering denizens. Now Khoury builds impeccably designed banks and apartment blocks. But his view is oriented towards the city rather than the sea.

“I have a great sensitivity for the relationship of the sour and the complex in this city,” he told me. “It keeps us aware, awake, alive.” In a well-run country, he would be engaged in institution building; in Beirut there are no government projects to build museums or libraries or law courts. “Beirut has forced me to develop different strategies,” said Khoury. Perhaps, he thought, there was more freedom in the private sector, where designs are not compromised by committee and the need for consensus.

Lebanon is full of paradoxes: the state does not exist in any meaningful way except for occasional obfuscating officiousness, and yet the country survives. Beirut is dysfunctional and yet warm and fun and cool. Beards are as likely to be hipster as they are to be fundamentalist, Arab nostalgia meets post-modernism in furniture design and restaurant menus. “The chaos is almost beyond redemption,” Hallak told me, then laughed ruefully as Lebanese do and added, “of course, we love the chaos!”

“I have stopped expecting Beirut to be a pretty city,” said Khoury. “It’s a city full of contradictions and I am very proud that I can contradict myself between one street corner and another.” In the unexpected spaces between the tall towers and the crumbling walls, in the alleyway interstices between public and private, there are people making, like Khoury, a life in which the tension of compromise forces creative solutions.

Maybe these urban developments can engender political development too. Maybe Beirut Madinati can be a platform to push the vested interests into better governance. Maybe Beirut can be a model for the rest of the region. Learning how to make do, and do something, even against a backdrop of political instability and violence. But then again, there are a lot of maybes in the Middle East, and optimism is not often rewarded.