* Truce due to begin on Friday, army says will respond to attacks
* FSA rebels say committed to truce
* UN hopes to use window to bring in aid
By Mariam Karouny and Stephanie Nebehay
BEIRUT/GENEVA, Oct 25 (Reuters) - Damascus residents reported artillery barrages by Syrian troops on Thursday hours before the scheduled start of a ceasefire to mark the Muslim holiday of Eid al-Adha.
They said the shelling by troops stationed on a mountain overlooking the Syrian capital targeted Hajar al-Aswad, a poor neighbourhood inhabited by refugees from the Israeli-occupied Golan Heights. There were no immediate reports of casualties.
"Consecutive artillery volleys from Qasioun shook my home," said Omar, an engineer who lives in al-Muhajereen district on a foothill of the mountain.
A Free Syrian Army commander had earlier given qualified backing to the truce, proposed by U.N.-Arab League envoy Lakhdar Brahimi, but he demanded that President Bashar al-Assad free detainees. An Islamist group said it was not committed to the truce, due to start on Friday, but may halt operations if the army did.
Brahimi proposed the temporary truce to stem, however briefly, the bloodshed in a conflict which erupted as popular protests in March last year and has escalated into a civil war which activists say has killed more than 32,000 people.
The fighting pits mainly Sunni Muslim rebels against Assad, from the Alawite faith which is linked to Shi'ite Islam, and threatens to draw in regional Sunni Muslim and Shi'ite powers and engulf the whole Middle East, Brahimi has warned.
"On the occasion of the blessed Eid al-Adha, the general command of the army and armed forces announces a halt to military operations on the territory of the Syrian Arab Republic, from Friday morning ... until Monday," an army statement read on state television said.
It reserved the right to respond if "the armed terrorist groups open fire on civilians and government forces, attack public and private properties, or use car bombs and explosives".
It would also respond to any reinforcement or re-supplying of rebel units, or smuggling of fighters from neighbouring countries "in violation of their international commitments to combat terrorism".
Qassem Saadeddine, head of the military council in Homs province and spokesman for the FSA joint command, said his fighters were committed to the truce.
"But we not allow the regime to reinforce its posts. We demand the release of the detainees, the regime should release them by tomorrow morning," he said.
Abu Moaz, spokesman for Ansar al-Islam, said the Islamist group doubted Assad's forces would observe the truce, though it might suspend operations if they did.
"We do not care about this truce. We are cautious. If the tanks are still there and the checkpoints are still there then what is the truce?" he said of the organisation, which includes several brigades fighting in the capital and Damascus province.
Brahimi's predecessor, former U.N. chief Kofi Annan, declared a ceasefire in Syria on April 12, but it soon became a dead letter, along with the rest of his six-point peace plan.
Violence has intensified since then, with daily death tolls compiled by opposition monitoring groups often exceeding 200.
U.N. aid agencies have geared up to take advantage of any window of opportunity provided by a ceasefire to go to areas that have been difficult to reach due to fighting, a U.N. official in Geneva said.
"UN agencies have been preparing rapidly to scale up especially in areas that have been difficult to reach due to active conflict and which may become accessible as a result of these developments," he told Reuters.
The U.N. refugee agency UNHCR said that it had prepared emergency kits for distribution for up to 13,000 families - an estimated 65,000 people - in previously inaccessible areas including Homs and the northeastern city of Hassaka.
"We and our partners want to be in a position to move quickly if security allows over the next few days," UNHCR Syria Representative Tarik Kurdi in Damascus said in a statement.
The U.N. World Food Programme has identified 90,000 people in 21 hotspots from Aleppo to Homs and Latakia in need food parcels and will try to reach them through local agencies, the U.N. official said.
Earlier on Thursday rebels seized two northern districts in Syria's largest city, Aleppo, on Thursday, activists said.
"We have just liberated Ashrafiyeh and the Syriac quarter," a rebel fighter said, referring to areas which had been held by Kurdish militias and troops loyal to President Bashar al-Assad.
Rebels were still fighting around the Rahman Mosque district and trying to besiege a security building, he added.
Activists said at least 14 people were killed. It was not clear if the dead were fighters or civilians.
The Syrian Observatory for Human Rights, an opposition group monitoring the Syrian conflict, said Kurdish units were still fighting to stop the rebels from entering Ashrafiyeh.
Battles have engulfed Aleppo since late July, but a stalemate had developed, with snipers restricting movement of fighters and the two sides largely entrenched on frontlines.
China urged all sides to respect a ceasefire, an idea also backed by Syria's main regional ally Iran,