CAIRO, Egypt -- Millions of Muslims paid respects at ancestral graves, shared festive family meals and visited beaches and amusement parks Thursday to mark the end of the fasting month of Ramadan, but violence and political tension overshadowed holiday joy in hotspots like Egypt, Yemen and Afghanistan.

The three-day Eid al-Fitr holiday, which caps Ramadan, also highlighted the long-running divide between Sunni and Shiite Muslims.

Many Sunnis began celebrating Thursday, while Shiites were to mark the holiday Friday, based on different views about sighting the moon.

In recent months, sectarian tensions have risen between Sunnis and Shiites, with the two sides increasingly lined up on opposite sides of Syria's civil war.

Ramadan and Eid al-Fitr are a time of increased religious devotion, and some Muslims said they're particularly distraught over discord among the faithful during the holiday season.

In Egypt, where rival political camps have been facing off since the military ousted President Mohammed Morsi last month, worshipper Medhat Abdel Moneam said he doesn't like to see Muslims quarreling.

Abdel Moneam was among hundreds of Morsi opponents performing prayers in Cairo's Tahrir Square.

"I am very sad about what is going on in Egypt," he said of the intensifying showdown between Morsi's Muslim Brotherhood and interim rulers backed by the military. "Today is Eid, and the Egyptian people are divided into two sides, two different thoughts, and it's a shame because both sides are Muslims."

Morsi supporters, camped out at two other sites in Cairo, said they will not give up until Morsi is reinstated. "Whoever thought that the revolution would come to an end once Ramadan is over was wrong," said Mohammed el-Beltagy, a top Muslim Brotherhood figure.

Protesters at one of the pro-Morsi sit-ins set up an amusement park for children with trampolines, slides and water games.

For many of the world's hundreds of millions of Muslims, Eid al-Fitr begins with a cemetery visit to pay respects to ancestors. In parts of the Middle East, people typically place palm fronds on graves.

In other holiday customs, children get haircuts, new clothes and toys, while well-off families slaughter animals and distribute the meat to the poor. Relatives visit each other, gather for festive meals, such as lamb and rice sprinkled with pine nuts, or spend the day in parks or on beaches.

In eastern Afghanistan, a bomb planted in a cemetery killed seven women and seven children from an extended family as they visited a relative's grave as part of Eid observances.

There was no claim of responsibility, but a man whose daughter was killed in the blast blamed Taliban insurgents. Afghan President Hamid Karzai condemned the attack and urged the Taliban to lay down their arms.

In northern Iraq, police closed many streets in the mainly Sunni city of Mosul to prevent car bombs during the holiday. Bombings are part of Iraq's ongoing sectarian strife, and violence has picked up in recent months.

Mosul resident Mohammed al-Samak said he planned to take his wife and five children to an amusement park later in the day despite the potential risk.

"We are aware that the security situation in Mosul is bad, but we cannot stay home all the time," he said. "The family and I decided to have a nice Eid, away from fear and sadness."

In Syria, devastated by civil war, rebels fired rockets and mortar shells Thursday at an upscale neighbourhood in the capital, Damascus, where President Bashar Assad attended Eid prayers.

At least two rebel brigades claimed to have hit Assad's motorcade on its way to a mosque, but this appeared to be untrue. Two opposition figures said the route was hit but not the convoy itself. State TV broadcast images of Assad praying at the mosque.

Syria's brutal war, in its third year, has killed more than 100,000 people and uprooted millions, with no end in sight.

In tent camps that have sprung up in neighbouring countries, Syrian refugees marked the holiday with a mix of hope and despair.

"We wish in this Eid that God liberates Syria and to return safely to our country," said Ibrahim Ismail, a refugee from Damascus, after he performed holiday prayers with others in Jordan's sprawling Zaatari camp.

Yet, he said, "we feel truly said because we are not at home, we are displaced."

In the Palestinian territories, rival leaders Mahmoud Abbas in the West Bank and Ismail Haniyeh in the Gaza Strip used holiday speeches to stake out their opposing views on the negotiations with Israel that resumed last week.

Abbas, the Western-backed Palestinian president, said he hoped that by next year's holiday, "our people will achieve their hope of freedom and independence." Abbas is embarking on a new attempt, after a five-year freeze, to negotiate the terms of a Palestinian state with Israel.

Haniyeh, the top leader of the Islamic militant Hamas organization in Gaza, urged Abbas to walk away from the negotiations, noting that 20 years of intermittent talks have delivered no results. "From here, we reaffirm our rejection of negotiations," he told worshippers.

In Yemen, security was tight Thursday in the capital, Sanaa, a day after the government announced it had foiled an al-Qaida plot to take over key cities in the south and attack strategic ports and gas facilities.

Multiple checkpoints were set up across Sanaa, and tanks and other military vehicles guarded vital institutions.

In Kosovo, a former hotspot, about 100 ethnic Albanian Muslims were driven by police escort Thursday into the Serb-run part of the town of Mitrovica to visit family graves.

The town was split into a northern part controlled by Serbs and a southern part run by Albanians at the end of the 1998-99 Kosovo war. Since then the two sides have lived apart and in enmity.

Laub reported from the West Bank. Associated Press writers Sameer N. Yacoub in Baghdad, Barbara Surk in Beirut, Nebi Qena in Pristina, Kosovo, and Amir Shah in Kabul contributed reporting.