Residents in Indonesia, the world's most populous Muslim-majority country, said they hoped the spirit of Eid would overcome fears about rising violence.
Millions of Indonesians attended Eid prayers in their best outfits across the country despite reports of a police officer being killed in an attack by suspected ISIL fighters in the city of Medan.
Tens of millions of people in Ethiopia, which has the second largest Muslim population in sub-Saharan Africa, marked the joyous Eid.
Huge crowds arrived at and around the Addis Ababa stadium for Eid prayers early in the morning.
Speaking on the occasion, Sheikh Mohammed Nur, the Islamic affairs president, said: "Our country Ethiopia is characterised by religious plurality and the people have lived in harmony for ages.
"Muslims in the country should stand vigilant against extremist elements."
Millions of Muslims in Egypt performed Eid prayers in more than 5,000 open areas across the country amid a stepped-up security presence, while President Abdel Fattah el-Sisi performed prayers at a mosque at Egypt’s naval headquarters in the coastal city of Alexandria.
Meanwhile, in Jerusalem, about 90,000 Muslims converged on al-Aqsa Mosque, which for Muslims represents the world's third holiest site, to perform Eid prayers.
For some, Eid was a brief respite from the horrific realities which they managed to flee from.
Ahmad Ali Abed escaped with his family and others from the ISIL-controlled Old City of Mosul to Irbil, north of the country.
"We ran between the houses. We knew that if ISIL spotted someone we'd all be shot," Abed said.
"I was scared that if they saw me and family they'd kill us all, but thank God we are rid of them. I still can't believe we made it here."
A woman who also escaped said that life in Mosul had been getting harder and harder.
"The hunger was killing us," she said. "We couldn't buy anything for the kids. Here today we received clothes. The kids are happy and were able to celebrate Eid."
Sisters Sumayah and Nabila Ali said they sought refuge in Malaysia after fleeing Yemen where more than 10,000 people have died in two years of conflict.
"When we say poor people, children who are not safe, are always in danger. We hope that one day it will be safe again and people will be happy again," said 28-year-old Sumayah.
Source: Al Jazeera and news agencies