BENGHAZI, Libya — Gunshots didn’t distract Nizar Al-Magrebi from the book he was reading in a cafe. The teenager was determined to better himself.
“The war made it clear to me how important it is to study hard to have a better life,” said Mr. Al-Magrebi, 18, who dreams of becoming an aeronautical engineer. “Cousins of mine died fighting the terrorists. I cannot give up. I should build a peaceful future in their tribute.”
Daily life has unquestionably been a struggle for Mr. Al-Magrebi and the roughly 800,000 other inhabitants of Benghazi in recent years.
They have had front-row seats to the clashes that made the city a global watchword for jihadi violence. The killings of U.S. Ambassador J. Christopher Stevens and three other Americans in 2012 would become a subject of fierce contention in American politics, damaging the popularity of President Obama and Secretary of State Hillary Clinton.
But these days, the mood in Benghazi is one of optimism as local authorities slowly but surely defeat the Islamic militants who once ran the city.
Three years ago, violence forced Mr. Al-Magrebi, his parents and six brothers and sisters to flee their neighborhood in southwestern Benghazi and move to a shared apartment west of the city.
“I sleep on a mattress that I lay down every night in the hall,” Mr. Al-Magrebi said in an interview in Cafe Verona in Majuri on the south side of Benghazi. “Right now, my parents’ friends are in the apartment. That’s why I am studying here.”
Fighting broke out in Benghazi in 2014 when Khalifa Haftar, a former military commander who served under Moammar Gadhafi, and his self-styled Libyan National Army sought to assert control over the city, known as the cradle of Libya’s 2011 revolution.
Islamist groups, including al Qaeda, the Islamic State and the militants who killed Stevens were riding roughshod over Benghazi at the time.
Today, fighting is sustained in only two Benghazi neighborhoods: a block of 12 buildings in Ganfouda and a 4.6-square-mile zone downtown.
Libyan National Army officials said they have worn down the terrorists.
“The military operation is over,” said Col. Ahmed al-Mismari, an army spokesman. “There are only 70 fighters in Ganfouda and no more than 30 in downtown. They can’t be replenished. We just have to wait until they surrender or carry out suicide attacks.”
But a new source of violence may emerge as the badly divided country tries to settle on a single government authority.
Mr. Haftar is allied with the Libyan House of Representatives based in the eastern city of Tobruk. While battling the Islamic militants, the Libyan National Army also has been fighting the Benghazi Defense Brigade, a non-jihadi militia affiliated with the Tripoli-based National Salvation Government.
Officials in Tobruk oppose lawmakers in Tripoli in the struggle for political control. Technically, the two sides have contributed to an internationally recognized Government of National Accord — backed by the United Nations — that is also based in Tripoli, but the power of the GNA is weak, and rival militias battle for control in the historic capital of Tripoli.
Out and about
In Benghazi, though, apart from the sporadic fighting, people move freely.
Hatem Sayid was recently watching his two boys as they enjoyed an amusement park ride in the al-Kish public garden.
“It was too dangerous to come before. Mortar shells used to fall here,” said Mr. Sayid. “My children stayed at home watching TV. I’m happy now because they can run riot outside.”
Although the fighting is mostly over, the consequences of the 33-month war won’t disappear immediately.
A third of downtown and at least 60 percent of the Benina district, where the airport is located, were destroyed in the war, said Ahmed Omar Ahmed, a civil engineer. The city government estimates that it could cost $5 billion to rebuild Benghazi.
Still, the art venue Tanarout is perhaps the best example of the city’s rebirth.
About 40 people meet regularly at Tanarout — a basement apartment filled with paintings, musical instruments, books and photography equipment — to find ways to express themselves artistically, just as co-founders Mohamed Tarhuna, a writer, and Hussam Thini, a calligrapher, envisioned.
Mr. Tarhuna said he wants Tanarout to “show that Benghazi is not only about war and that Libya is not only about terrorism.”
Ennour Mohamed, 31, first came to the venue early this month and was an instant convert.
“I’ve found myself here,” said Mr. Mohamed, adding that Islamic fundamentalism is still a potent force in Benghazi. “Outside, people are close-minded, but here I can say what I really have on my mind. You can learn so many things.”
Ms. Thini said Salafists, members of a conservative sect of Sunni Islam that is highly influential in Saudi Arabia, have criticized pictures of Tanarout on social media because they can see women — some not wearing veils — painting and playing music.
But she didn’t believe conservatives could silence the venue. “Salafi brigades could try to shut the center down, but I’m sure that the neighbors will protect us,” she said.
Still, religious fundamentalists are likely to remain in Benghazi, officials said.
“Salafists are helping the Libyan National Army to fight against terrorists, so they are popular among the population,” said Abeir Imneia, a member of Libya’s Civil Society Commission, which oversees nongovernmental organizations in the country. “Maybe they won’t take power, but I’m afraid they will try to control our way of thinking.”
This month, for example, the city government of Beyda, which was appointed by the House of Representatives, banned women younger than 60 from traveling alone on international flights out of eastern airports.
Political infighting can spill into the streets. A Libyan spokesman told The Associated Press that a top Benghazi security official, a colonel who refused to step down after being fired from his job, had survived a car bombing. It was the second assassination attempt targeting security officials in one month, the AP reported.
Some have also raised concerns about the undemocratic tendencies of governments in eastern Libya. In August, Mr. Haftar ousted Benghazi’s elected mayor and installed Ahmed Laraibi, an intelligence officer, in his place.
“We cannot publicly criticize too hard Haftar in public,” said a local journalist who asked to remain anonymous. “Benghazi is ruled by a military man, and don’t forget that Gadhafi was a colonel. Haftar will never be a new Gaddafi, but the revolution didn’t happen to bring back military regime.”
Mr. Laraibi said he was installed because the previous administration wasn’t repairing the damage from years of fighting. “My duty is to rebuild the city, which could take two or three years,” he said in an interview.
Mr. Al-Magrebi, the young student, said he remained more hopeful than concerned.
The year 2017 “means the end of the war,” he said. “From now on, everything is possible.”
Please read our comment policy before commenting.