The nationwide restrictions, however, on image and video sharing on messaging apps WhatsApp and Viber were lifted yesterday.
President Maithripala Sirisena ordered the telecom regulator to lift the ban following talks between the government, led by his Secretary and head of the Telecommunications Regulatory Commission Austin Fernando and Facebook officials here.
"My secretary has discussed with officials of Facebook, who have agreed that its platform will not be used for spreading hate speech and inciting violence," the president, who is currently touring Japan, said on Twitter.
According to an official statement, President Sirisena has ordered the country's telecommunications regulator to lift the blockage on access to Facebook.
"In the context, where the impact that could be made by social media to expeditiously increase violent actions based on racism and religious extremism has been internationally proven.
"Sri Lanka was able to control the rapid spread of violence by temporarily imposing restriction on social media as an action to ensure the national and public safety of Sri Lanka," the statement said.
Prime Minister Ranil Wickremesinghe had said that the government would put in place a mechanism for the social media to prevent the attempts to disturb the livelihoods of people through spreading ethnic-hatred and racism, and damaging the image of an individual through false allegations.
The government received flack from the Opposition for not lifting the ban despite improvement in the situation, which alleged that it was a move aimed at gaging the criticism of the government.
Sri Lanka's Minister of Youth Affairs and Southern Development Minister Sagala Ratnayaka had also criticised the government for continuing with the ban on social media, saying blocking Facebook and messaging apps in long term was not an option in present times.
He said the social media ban makes a negative impact on the economy and hamper IT, E-commerce and tourism sectors.
Telecommunications Minister Harin Fernando said that the blockage through local service providers on Facebook and other social media were necessary to prevent an escalation of the anti-Muslim riots that left three people dead and arson attacks against over 200 houses and businesses in Kandy district.
A state of emergency was declared to rein in the spread of communal violence between the majority Sinhala and minority Muslims in the country's scenic Kandy district.
Violence, triggered by the death of a Sinhalese man at the hands of a mob, erupted in the Theldeniya area of the central hill district popular with tourists.
The government deployed thousands of troops to restore peace and protect the minority Muslims and their property.
The area is currently peaceful and no attacks have been reported since Thursday.