ISLAMABAD, Pakistan (CNN) -- Hundreds of Pakistani residents have taken up arms and are battling local Taliban militants in the wake of a deadly mosque attack last week.



A Pakistani police stands guard at a checkpoint in Peshawar, Pakistan on June 8.



It is the first major battle between the residents of northwest Pakistan and Taliban militants near the Afghanistan border.



The residents are outraged over a suicide attack on a local mosque during Friday prayers that killed at least 40 people and wounded some 80 others.



Starting on Saturday morning, some 400 villagers in the Upper Dir district formed a "lashkar" -- or militia -- to fight the Taliban, killing 14 of the militants as of Sunday evening, according to local administrator Atiq Ur Rehman. Four of the villagers have been injured in the battle, Rehman said.



The militia have burned a number of houses thought to be sheltering the militants, according to Upper Dir police chief Ijaz Kahn.



Both the residents and Taliban fighters are using heavy weapons, including rocket launchers and anti-aircraft weapons, Rehman said.



There is a long history of Taliban presence in the area, including foreign fighters in leadership roles, local officials said.



Authorities said Taliban fighters were driven out of Shot Ghas and Ghazigay -- two villages where the Taliban have support.



The villagers took up arms against the Taliban after Friday's suicide attack at a mosque in Hayagay Sharqi -- a village in Upper Dir located about 35 km (22 miles) from the Afghan border and known for being against the Taliban.



Upper Dir is a part of the Swat Valley, where the Pakistani military has waged a month-long operation against Taliban militants, but the district has not been part of the ongoing military offensive.



The United Nations has said an estimated 2 million Pakistanis have been displaced by fighting between the Pakistani military and Taliban militants.



The militants threatened to continue attacking cities in Pakistan until the military ends its operations against Taliban militants. As a result, Pakistani authorities have increased security in Islamabad, Pakistan's capital city.



CNN's Ingrid Formanek and journalist Nasir Habib contributed to this report
What follows after suspected suicide attack? Who is using heavy weapons? How many Pakistanis have been displaced by fighting? Where is the Pakistan army fighting the Taliban militants? Where are they fighting? Who is fighting? What does the U.N. say? What caused backlash? Where is Upper Dir? How many Pakistani have been displaced? How many Pakistanis have been displaced? When was the suicide attack? What did the official say? How many have been displaced? Where is the Swat valley?
Hundreds of Pakistani residents have taken up arms and are battling local Both the residents and Taliban 2 million near the Afghanistan border. Upper Dir district Pakistani military and Taliban militants. an estimated 2 million Pakistanis have been displaced by fighting between the Pakistani military and Taliban militants. deadly mosque attack Pakistan an estimated 2 million estimated 2 million Friday There is a long history of Taliban presence in the area, including foreign fighters in leadership roles, estimated 2 million Pakistanis Upper Dir
question: What follows after suspected suicide attack?, answer: Hundreds of Pakistani residents have taken up arms and are battling local | question: Who is using heavy weapons?, answer: Both the residents and Taliban | question: How many Pakistanis have been displaced by fighting?, answer: 2 million | question: Where is the Pakistan army fighting the Taliban militants?, answer: near the Afghanistan border. | question: Where are they fighting?, answer: Upper Dir district | question: Who is fighting?, answer: Pakistani military and Taliban militants. | question: What does the U.N. say?, answer: an estimated 2 million Pakistanis have been displaced by fighting between the Pakistani military and Taliban militants. | question: What caused backlash?, answer: deadly mosque attack | question: Where is Upper Dir?, answer: Pakistan | question: How many Pakistani have been displaced?, answer: an estimated 2 million | question: How many Pakistanis have been displaced?, answer: estimated 2 million | question: When was the suicide attack?, answer: Friday | question: What did the official say?, answer: There is a long history of Taliban presence in the area, including foreign fighters in leadership roles, | question: How many have been displaced?, answer: estimated 2 million Pakistanis | question: Where is the Swat valley?, answer: Upper Dir