The ban on YouTube in Pakistan has been lifted after Google agreed to launch a localised version that would allow the government to remove any material that it deemed to be offensive.
In September 2012, the country banned the video streaming site after an anti-Islam film, ‘Innocence of Muslims’ was uploaded.
The film subsequently sparked violent protests across major cities in the Muslim country with a population of 190 million people.
Under the new version of YouTube, the Pakistan Telecommunication Authority (PTA) can ask for access to offending material to be blocked.
"On the recommendation of PTA, the government of Pakistan has allowed access to the recently launched country version of YouTube for internet users in Pakistan," said the Ministry of Information Technology and Telecom.
Although Google has conceded to blocking access to material deemed offensive by the government, it would not automatically remove material from the site and any takedown requests would be subject to review in a similar fashion to how YouTube is run in other countries.
In addition, requests from the government to remove content would be reported publicly.
"We have clear community guidelines, and when videos violate those rules, we remove them," Google said.
"Where we have launched YouTube locally and we are notified that a video is illegal in that country, we may restrict access to it after a thorough review."
The Pakistani government has a history of controlling the spread of information on the internet, with thousands of websites blocked in the last few years.
In December, BlackBerry announced it was pulling out of the country after the government demanded access to the encrypted communications of its users.