Beirut: Millions of Muslims on Wednesday celebrated the festival at the end of the holy month of Ramadan, marked this year by a series of deadly jihadist attacks.
The three-day Eid al-Fitr festival traditionally means family gatherings and the exchange of gifts and sweets after a month of fasting from dawn until dusk.
But a wave of attacks in Muslim countries — from Turkey and Bangladesh to Iraq and Saudi Arabia — have made this year's Eid a sombre occasion.
Tens of thousands of worshippers gathered for Eid prayers at Islam's second-holiest site, the Prophet's Mosque in the Saudi city of Medina, just two days after a suicide bombing that killed four security guards in a nearby carpark.
Addressing the crowd, Sheikh Abdelbari al-Thabiti said the bombing was an "odious crime" carried out by "a group that no longer respects the rites of Allah or the sanctity of the Prophet's Mosque."
In Baghdad, Eid was overshadowed by a massive suicide car bombing on Sunday that ripped through the Shiite-majority Karrada district and left at least 250 dead.
On Wednesday Iraqis placed thousands of candles along sidewalks and in the charred remains of a building at the site of the blast.
Some prayed or read the Quran; others laid flowers and Iraqi flags or hugged and wept.
If it were a normal Eid "people would be happy and this street would be open, and people would be walking on it," Mohammed Al Sultan told AFP at the site of the bombing.
"But this tragedy that happened to us, the young people who died... is this our Eid? Is it possible for it to be Eid in this way?"
Across the border in war-torn Syria, the army said it would observe a 72-hour nationwide ceasefire coinciding with Eid.
But one person was killed and another wounded Wednesday morning when artillery fire hit a rebel-controlled part of second city Aleppo, said the Syrian Observatory for Human Rights.
Rebel forces fired back at regime-held parts of the city with mortars, it said.
"I had planned to visit family and friends, to bring my children out to play, but we decided to stay inside the house in case the shelling resumes," said Ahmad Naseef, 30.
"I hope things will calm down a bit during Eid, not for me but for my children."
Many of the attacks throughout Ramadan were claimed by or blamed on the Islamic State group.
Analysts fear that defeats in its Syrian and Iraqi strongholds are pushing the group to launch more attacks further afield.
Turkish authorities said the group was responsible for an attack late last month at Istanbul's Ataturk international airport which left 45 people dead.
In Bangladesh on Wednesday, an eerie silence pervaded the diplomatic quarter of Dhaka five days after the IS-claimed killing of 20 hostages at a popular cafe.
The run-up to Eid usually sees malls packed with shoppers. But on Wednesday many of the area's popular restaurants and shopping centres remained closed.
"Our guest numbers have gone down dramatically so the management took the decision to keep it shut for a while," said Abdul Mazid, a guard at Meraki, a well-known restaurant.
In Pakistan, thousands of worshippers attended Eid al-Fitr prayers at a mosque in Karachi.
"At the moment the most important thing is brotherhood. We have to show solidarity and stand to eliminate sectarianism," said worshipper Muhammad Ikhlaq.
Hundreds also gathered at an open-air mosque in the Nigerian capital Lagos to pray.
A seven-year insurgency by Islamist group Boko Haram in northeastern Nigeria has left at least 20,000 people dead and more than 2.6 million homeless.
Shamy Noshy El-Shamy, an imam who led the prayers, condemned violence between Muslims, saying the Medina attack happened "because of lack of real knowledge about Islam."
"Real islam is not all these bombings, all these fightings. Islam is a religion of peace. Islam means peace," he said.
About 150,000 people also attended morning prayers at the Al-Aqsa Mosque in annexed east Jerusalem, according to the Islamic Waqf organisation which is responsible for the mosque compound, the third-holiest site in Islam.
But movement restrictions prevented some Palestinians from visiting their families to mark the holiday.
Israeli soldiers on Wednesday blocked vehicles from leaving the West Bank city of Hebron, under lockdown since July 2 after two Israelis were killed in Palestinian attacks nearby.
Security measures were also tight in Egypt, where an IS affiliate based in the Sinai Peninsula has waged an insurgency that has killed hundreds of policemen and soldiers.
In Cairo, thousands of families gathered for mass prayers and relaxed in public gardens and malls.
"Eid is a relief from our small daily battles with the traffic jams and work stress," said Heba Essam, 35, a businesswoman.
Ahmed Mohamed, a web designer who recently became a father, said he hoped Eid would take Egyptians' minds off their difficult economic situation.
"I will stay at home for family gatherings the whole three days to avoid any expenses," he said.