By Ahmed Elumami
BENGHAZI, Libya (Reuters) - When Libyan government forces and Islamist militants battled with artillery guns right in his district, Khalil al-Barassi knew it was time to pack up. He moved his family into an abandoned schoolhouse, where they live on aid from the Red Crescent, while the city around them falls to pieces.
After a year of war, Libya's second-largest city Benghazi is divided into areas controlled by forces loyal to one of two rival Libyan governments, and areas held by Islamist fighters led by the group Washington blames for the 2012 attack that killed its ambassador.
The city was the birthplace of the revolt that toppled dictator Muammar Gaddafi in 2011, with residents who pride themselves on a willingness to rise up and defend themselves from exploitation.
But with rockets crashing daily into its boulevards, neighborhoods reduced to rubble and around a tenth of its 1 million people made homeless, Benghazi has now become one of the worst examples of the chaos that followed Gaddafi's downfall.
As elsewhere in Libya, armed groups have lined up behind the two rival governments. In Benghazi, one government backs a Gaddafi-era army general and the other backs the Islamists.
Both pay fighters out of central revenues under a system set up after Gaddafi's downfall, which saw scores of armed groups placed on the public payroll, effectively subsidizing civil war from the country's oil exports.
Some of Benghazi's 90,000 displaced people have moved in with relatives living in safer areas. Others, like Barassi with his wife and four children, have moved into schools, empty now that the fighting has prevented them from opening.
"Rockets hit the buildings in our street," said Barassi whose family has been sleeping for ten months on blankets in a rundown school packed with some 15 other families sharing classrooms. Electricity is sporadic.
"It's bad here but I cannot afford to rent a flat," said the 47-year who depends on aid from the Red Crescent and a small salary as a soldier guarding a hospital.
The battle for the city started a year ago when retired army general Khalifa Haftar launched his own war against Ansar al-Sharia, the militant group blamed by Washington for the Sept. 11 2012 assault on a U.S. diplomatic mission that killed four Americans including ambassador Christopher Stevens.
Last month, Libya's internationally recognized parliament, which is based out of an eastern town after being forced out of the capital Tripoli by a rival government, appointed Haftar as its top army commander.
So far, the Benghazi fighting has been inconclusive, with both sides relying on poorly-trained "brigades" of fighters who confront each other with outdated weapons such as Toyota trucks mounted with heavy guns.
Haftar's army forces have used air support to help win back territory from Islamist fighters, including the airport area, eastern districts and several barracks that had been overrun last summer.
But despite almost daily army pushes, Islamists are still holed up in the port area in the city center, where Barassi lived before he had to flee, and in some western districts. Street battles go back and forth while army helicopters open fire.
"Whenever we approach their strongholds the terrorists fire rockets on residential districts," said Fadhl al-Hassi, an army commander. The Islamist camp denies this.
In a city where virtually everyone has access to weapons, neighbors - armed but wearing civilian clothes - have joined pro-army forces to help dismantle Ansar al-Sharia checkpoints.
Haftar's opponents have organized themselves as the "Majlis al-Shura" umbrella group, which links Ansar al-Sharia and other former anti-Gaddafi brigades, some of which were not initially allied to the Islamists but made common cause against a military they accuse of trying to bring back Gaddafi-style dictatorship.
This month, the government based in Tripoli, which is not internationally recognized but holds most of the West of the country including the capital, said it would provide unlimited support to the Majlis al-Shura.
Adding to the chaos, other Islamist militants who have proclaimed themselves loyal to Islamic State - the group that controls much of Syria and Iraq - have also started exploiting the security vacuum. They killed seven people in a suicide attack on an army checkpoint last month.
The government that supports Haftar describes Majlis al-Shura as terrorists who have teamed up with Islamic State; Majlis al-Shura denies it has links to the militants.
Haftar has said his forces control more than 80 percent of Benghazi, though his opponents dispute this. After army forces said they were close to taking the port and nearby government buildings, Majlis al-Shura fighters filmed a video posing there.
"75 per cent to 80 per cent of Benghazi is under control of Majlis Shura," said Mohamed Bakeer, the group's spokesman.
"The daily life of our fighters is great. They have high morale and their main goal now is to end Haftar's coup."
A year into the fighting, residents are learning how to cope. Only two hospitals still work, while most schools and the city's university are closed. The main campus was a battlefield for weeks.
But life in army-controlled areas has returned to some normality, with banks and restaurants reopening, though rockets fired from nearby battle zones still hit buildings. Two civilians were killed by rockets on Monday alone.
The streets are usually safest in the morning, when fighters tend to sleep after battling through the night. In the early hours, civil servants queue at state banks to pick up their salaries. Young people sit down in cafes to use their internet.
"At the beginning of the war we didn't go anywhere, but now we go for picnics at the weekend in the east of Benghazi, as it is safer," said Mohammed al-Faitouri, an accountant.
He still drives to work every day, crossing an army checkpoint, but has cut his work hours to be at home by 2 pm, before fighting usually picks up after afternoon prayers.
"It is good that shops are opened now," the 44-year old said. "My wife and I go shopping but we have to be at home before sunset."
(additional reporting by Ayman al-Warfalli; Writing by Ahmed Elumami and Ulf Laessing; Editing by Peter Graff)