BENGHAZI, Libya (Reuters) - At Benghazi University, graduation pictures shot at a wrecked campus symbolize hope for a return to normality in the city after more than two years of war.

A worker shows a box of expired medicine at the pharmacy of Benghazi Medical Centre in Benghazi, Libya October 26, 2016. REUTERS/Esam Omran Al-Fetori

It is a war in which the eastern-based Libyan National Army (LNA) has been slowly prevailing against a coalition of Islamists and former revolutionaries. Its commander, Khalifa Haftar, is gaining political influence, his popularity boosted by the army’s advance.

“We can’t pursue our studies here but thanks to our army I’ve been able to return, if it wasn’t for them I wouldn’t be standing here,” said Amal al-Obeidi, a law graduate. “The situation will get back to normal and we hold great hope in our army.”

But while the LNA’s progress has brought relative calm to parts of Benghazi, continued clashes and bomb attacks have exposed the limits of the army’s control and raised questions about its ambitions to dominate Libya’s rival factions.

While Obeidi spoke, the rumble of war could still be heard in the besieged district of Ganfouda, less than 2 km (1 mile) to the south. Residents across Benghazi struggle with deteriorating living conditions and critics are alarmed at the spread of military rule in the city where the 2011 uprising against Muammar Gaddafi began.

Haftar, a former Gaddafi ally who fell out with him and returned to Libya during the revolution, is the figurehead for one of two loose alliances that began fighting for power in 2014. His rivals in the Islamist-leaning Libya Dawn faction took Tripoli that year but later splintered and largely swung behind the U.N.-backed Government of National Accord (GNA), which moved to the capital in March.

Haftar and an eastern parliament and government that back him have refused to endorse the GNA, becoming more confident as the GNA has struggled. Two months ago, they gained new momentum when the Libyan National Army seized oil ports south-west of Benghazi from a GNA-aligned faction, fuelling speculation that Haftar had western Libya - and Tripoli - in his sights.

Clashes in Benghazi have been contained to two or three areas. Some residents in the center of the port city of 700,000 feel safe for the first time in years, remembering the bombings and assassinations that preceded the May 2014 launch of Haftar’s Operation Dignity, his campaign against the Islamists, and the fighting that followed.

New measures include electronic traffic surveillance, car bomb detection squads and female police patrols.

Slideshow ( 11 images )

“We have brought security back in more than 90 percent of the city,” said Saleh Huwaidi, head of Benghazi’s security administration. “We’re not denying that there are sleeper cells, but they aren’t easily able to activate.”

Such claims have been tested by recent events, however. In the past month two bomb attacks in Benghazi have struck prominent Haftar allies.

RENEWED CLASHES

Violence has flared between the LNA and its main opponent, the Benghazi Revolutionaries Shura Council (BRSC). This week at least 38 LNA troops have died after Haftar launched his latest offensive, which included air strikes over parts of the city.

On Thursday the LNA said it had “liberated” the long-contested district of Guwarsha, with at least 18 of the LNA’s men killed in a single day’s fighting.

In Ganfouda, human rights groups estimate that more than 130 families have been trapped for months without access to fresh food by an LNA siege - though the army says it has offered them a chance to leave. When LNA air strikes have hit civilians, the army has accused its opponents of using human shields.

The LNA’s real power can be hard to gauge. Supporters say training and organization have improved, but the army’s strength depends on complex and shifting local alliances. Analysts attribute its breakthroughs in Benghazi against the BRSC and Islamic State partly to injections of material and intelligence support from Egypt, the United Arab Emirates, and France.

Rumors swirl of counter attacks against the oil ports, Benghazi, and in the city of Derna, close to the Egyptian border, where the LNA is fighting a separate coalition and clashes resumed over recent days.

Wissam Bin Hamid, a BRSC leader who along with others has sought refuge in Tripoli, told Al Jazeera this week that his group’s goal remains “to secure Benghazi ... remove the intimidation against people who live with Haftar’s militias, and allow the return of our displaced people and loved ones”.

Rivals accuse the LNA of stoking violence by branding all its opponents as terrorists. But as the LNA’s profile has grown in the east, criticizing or even questioning it has become risky. Bloggers and activists fear reprisals, and execution style killings have occurred in neighborhoods taken by the army.

The LNA has replaced municipal councils with military governors in Benghazi and at least seven other towns and cities, a move it says is necessary to restore order and bring back services. As elsewhere in Libya, those have been ruined by years of conflict and political turmoil.

But taking on a bigger role also carries a risk for Haftar and the army, said Mohamed Eljarh, an Atlantic Council analyst based in eastern Libya.

“I don’t know how they will manage to respond to the needs of the people, and they will increasingly be blamed for any shortcomings,” he said. After the recent bombings, “people are saying, ‘hey, LNA where are you?’”