Two protesters died on Monday as rallies in Pakistan over an anti-Islam movie intensified and the government blocked access to YouTube after the video site failed to remove the film. Thousands took to the streets in towns and cities across the country to vent their fury at the film, \"Innocence of Muslims\", which mocks the Prophet Mohammad, burning American flags and effigies of US President Barack Obama. About 800 people demonstrated in the northwestern town of Warai, in Upper Dir district, setting fire to a magistrate\'s house and the local press club before a protester was killed in an exchange of gunfire with police. Another demonstrator died on Monday afternoon after being shot in the head during clashes with police near the US consulate in Karachi on Sunday, a hospital official said. Up to 3,000 university students, teachers and employees marched in Peshawar, the main city of the militant-plagued northwest, chanting anti-US slogans and demanding a ban on the \"Innocence of Muslims\" movie. In the eastern city of Lahore, around 500 angry protesters tried to reach the US consulate on Monday evening but were dispersed by police with tear gas. The low-budget film, thought to have been produced by a small group of Christian extremists in the United States, has sparked violent anti-American protests across the Islamic world. US diplomatic missions have been attacked, though the film was privately made and Secretary of State Hillary Clinton has condemned it as \"disgusting and reprehensible\". The American embassy in Islamabad was closed on Monday because of the risk of demonstrations near the mission, and diplomats have been banned from all but essential travel throughout the country. Google has barred access to the video in Egypt, India, Indonesia, Libya and Malaysia, while the government has restricted access to Google-owned YouTube in Afghanistan. Pakistan\'s Prime Minister Raja Pervez Ashraf ordered YouTube to be blocked on Monday evening after the site \"refused to heed to the advice of the government of Pakistan to remove blasphemous film from its site\", a statement from his office said. Attempts to access YouTube met with a message saying the website had been classed as containing \"indecent material\" and was blocked on the orders of the Pakistan Telecom Authority. During the protest in Warai earlier, officers had baton-charged protesters and fired tear gas to try to disperse them, Mohammad Irshad, a senior local government official in Upper Dir, told AFP. They also fired live rounds into the air, prompting the demonstrators to return fire, he said, although it was unclear who fired the fatal shot that killed one of the protesters. Two others were wounded by gunfire, he said. Ihsanullah Khan, police chief for Upper Dir, which is adjacent to a former Taliban stronghold crushed in 2009, said 22 protesters had been arrested and the situation was under control. Anti-US feeling runs high in Pakistan\'s restive northwest, which borders Afghanistan, and Taliban and Al-Qaeda militants have long had strongholds in the area. In the border town of Chaman, in southwestern Baluchistan province, where trucks supplying troops with the US-led NATO force in Afghanistan cross the frontier, about 500 students demonstrated, burning an effigy of Obama. Hundreds of students protested in Quetta, the capital of Baluchistan, with caricatures of Obama placed on a donkey as a gesture of humiliation. At another protest in Peshawar, some 350 activists from Islami Jamiat-e-Talaba, a student wing of the hardline Sunni party Jamaat-e-Islami (JI), blocked a main road by setting fire to tyres and burning a US flag, an AFP reporter said. In the port city of Karachi, up to 100 youths from JI rallied, trying to reach the American consulate before being dispersed by police with tear gas. A total of 19 people have now died in violence linked to the film, including the US ambassador to Libya and three other Americans killed in the Libyan city of Benghazi last week.