With much of the Middle East in flux, suspicions intensifying over Iran's nuclear ambitions, a deepening political crisis in Pakistan, and the escalation of jihadist violence in Nigeria there are plenty of potential flashpoints in the year ahead.

There is a distinction between localised conflicts that are largely contained within borders and the kind of global, transnational terrorism that produced events such as 9/11, the Madrid bombings and, in the eyes of many, destructive military ventures like the US-led invasion of Iraq.

Afghanistan

Image caption Roadside bombs, like this one in Laghman province, have claimed the lives of many Afghan civilians

2011 was another violent year for Afghanistan, with more than 2,000 civilians killed in the first 10 months of the year. The drivers for that violence - insurgency, gun battles, air strikes and criminality - are not about to disappear but the picture is changing. Nato (Isaf) is increasingly positioning itself for the withdrawal of its combat forces by the end of 2014, accelerating the training of Afghan security forces in the hopes they will be robust enough to maintain a semblance of national security and keep al-Qaeda out.

The eventual departure of most foreign forces will not necessarily spell the end of conflict. A worst-case scenario that Nato is working to prevent is that the country reverts to the sort of self-destructive mayhem and warlordism it endured in the early 1990s following the Soviet pullout and that the Taliban re-emerge in the south, bringing al-Qaeda with them.

Pakistan

Logically, an eventual winding down of the Nato vs Taliban conflict in Afghanistan ought to take some of the steam out of Pakistan's own simmering insurgency. But Pakistan's problems run deeper than that, with the country beginning the year with a crisis in relations between its weak civilian government and powerful military as well as a profound mistrust between Washington and Islamabad.

Much has been written in the US media about concerns over the safety of Pakistan's nuclear ballistic arsenal. While these fears may be exaggerated, some militants will be looking to exploit the political chaos and 2012 looks set to be another violent year. Neither the CIA's drone strikes against militants in Pakistan's tribal territories nor al-Qaeda's activities there are likely to stop soon.

Iran and the Gulf

Image caption Iranian naval exercises in the Gulf in December and early January have ratcheted up regional tensions

International concern over Iran's accelerating nuclear programme is now so profound that Israel - which feels most threatened by Iran - is having to choose between two deeply unappealing options: living with a nuclear-armed Iran within missile range or launching a pre-emptive strike and starting a war which it may not be able to finish.

Iran has been "wargaming" (planning) for this latter scenario for years and is believed to have in place a number of retaliatory measures should it ever come under full-scale attack. These include Hezbollah in Lebanon unleashing a barrage of rockets on Israel, firing its own missiles at US bases in the Gulf, closing the Strait of Hormuz to shipping and activating sleeper cells in Gulf Arab countries to attack infrastructure and foment unrest. US military officers have so far shown little or no appetite for opening a new theatre of conflict in Iran.

Iraq

The departure of US combat forces last month after nearly nine years has not been matched by an end to violence. Al-Qaeda's Iraqi franchise, which many had started to dismiss as a spent and beaten force, has claimed responsibility for the co-ordinated bombings across Baghdad in December that killed more than 60 people. If Iraq's Sunni minority continues to feel disenfranchised and discriminated against by the Shia-dominated government of Prime Minister Nouri Maliki, then there is a risk that violent extremists may be able to attract more recruits to their ranks.

Yemen

Yemen is currently in slow-motion turmoil. There are clashes almost daily, sometimes between democracy protesters and snipers loyal to outgoing President Saleh, sometimes between supporters of rival tribal groupings, sometimes between the army and Islamist militants in the southern province of Abyan. Yemen's Gulf neighbours, as well as the UK and US, are concerned that with all its problems coupled with economic collapse, Yemen does not become a failed state. 2012 will be critical in determining whether the country can get itself out of its current impasse.

Somalia

There have been fears, so far unfounded, of an institutional linkup between Somalia's jihadist group, al-Shabab, and its prolific maritime pirates. There is limited co-existence, mainly for financial gain, but no sign yet that Somali pirates would be willing to hand over captured sailors to al-Shabab. Of more concern to the authorities in Britain is the small trickle of British volunteers heading to Somalia intent on volunteering for jihad. Their worry is that sooner or later some will be tempted - as others have in Pakistan - to return to attack Britain instead of fighting and dying in a distant country.

North Africa

Image caption Much of the Libyan capital is still under the control of different militias

The upheavals across Tunisia, Libya and Egypt prompted by the Arab Awakening have been followed by only limited outbreaks of violence but certainly in Libya and Egypt, there is a risk that more could follow.

In Libya, it has been proving hard to persuade armed militias to surrender their guns, and there is a real worry that weapons looted from Gaddafi's arsenals have leaked across the southern borders into the hands of militants in Mali and elsewhere. Of greatest concern is the risk of shoulder-launched missiles falling into terrorist hands and there has been a major drive to try to locate them.

Al-Qaeda's franchise in the Sahara, known as al-Qaeda in the Islamic Maghreb (Aqim) is currently holding 12 Europeans for ransom and Western governments have warned their citizens to avoid large parts of the Sahara region for fear of kidnap.

Nigeria

Last year, attacks by the group Boko Haram - which means "Western education is forbidden" - killed more than 450 people, including at the UN headquarters in Abuja, a radical departure from its previous targets of police, judges and other local figures. In mid-2011, the US general commanding the Pentagon's Africa Command (Africom) warned there may be growing links between Boko Haram and Aqim. Britain's domestic intelligence agency, MI5, is believed to be on the lookout for any signs of Boko Haram connections amongst Britain's sizable Nigerian community.

The Olympics

Britain's hosting of the Olympics this summer will, we are told, see "the biggest security operation in this country since the Second World War". Some 13,500 military personnel will be on duty, a Royal Navy helicopter-carrying warship will be docked near the venue, ground-to-air missiles will be deployed and RAF Typhoon fighters will be on standby to provide air defence. None of which should be needed, if all goes to plan. But the Olympics are classed as a "trophy target" for anyone looking to damage Britain and security preparations are being made on the basis of the national terrorist threat being at "severe", the second highest level in a table of five.

Cyber

Computers belonging to government institutions, commercial organisations and private individuals are coming under constant cyber attack, according to GCHQ, the government's secret communications HQ in Cheltenham. Attacks range from commercial espionage to stealing credit card details to trying to hack into military secrets. To head off the possibility of a catastrophic cyber attack on Britain's infrastructure, the government is investing heavily in protective measures, fighting what it calls "a constant arms race in cyber space".