Pakistan announced on Monday that it was restoring YouTube access in the country, after Google created a Pakistan-specific version of its video platform that allows authorities to censor content on the site.
YouTube was blocked in Pakistan in 2012 after the posting of an inflammatory video, Innocence of Muslims, sparked violent protests across the Muslim world.
The three-year ban has been one of the site's most high-profile outages, alongside its legal battles in Turkey.
Pakistan's government on Monday ordered the country's telecom regulator to lift a ban on YouTube within 48 hours, a senior Pakistani official told the Financial Times.
"We have reached an understanding with YouTube so that material considered offensive will not be shown in Pakistan," he said.