The state of Pakistan has been in conflict ever since it was formed in 1947 when a part of India, at the time ruled by the British, was cordoned off to create a Muslim state. Two bitter wars have followed as India and Pakistan fight it out for control of the disputed Kashmiri territory. Many extremist groups have gathered in Pakistan over recent years. Islamabad and the tribal areas bordering Afghanistan are particularly unsafe, where al-Qaeda and Taliban militants roam.