The West's fight against al Qaida is like the battle against revolutionary communism, former prime minister Tony Blair has said as he warned it could last for a generation.

He said Britain was right to send troops to support the French effort in Mali to put down a terrorist attempt to overthrow the country's government.

Prime Minister David Cameron faced difficult decisions to fight terrorism, Blair said, but warned the cost of standing aside would be far greater.

Britain at least had to try and "shape" events in the Middle East, he added, telling the BBC's Andrew Marr show that in Syria there was already a danger the more extreme elements of the opposition forces fighting president Bashar Assad's regime would take over.

Blair said: "I think we should acknowledge how difficult these decisions are.

"Sometimes in politics you come across a decision which the choice is very binary, you go this way or that way and whichever way you go the choice is very messy.

"If we engage with this, not just military but over a long period of time, in trying to help these countries, it is going to be very, very hard but I think personally the choice of disengaging is going to be even greater."

mali

A Tiger helicopter lands at the Mopti airport, in Sevare

He added: "We always want in the West, quite naturally, to go in and go out, and think there is a clean result. It's not going to happen like that. We now know that. It is going to be long and difficult and messy.

"My point is very simple though: if you don't intervene and let it happen, it is also going to be long, difficult and messy, and possibly a lot worse. It's a very difficult decision.

"We are certainly talking about a generation. I think a better way to look at it is like the fight the West had over a long period of time with revolutionary communism.

"It will happen in many different theatres, it will happen in many different ways but the truth is that you have no option but to confront it, to try over time to defeat it."

mali violence

A young Malian, who fled the violence in the historic city of Timbuktu, carries a cup in a refugee camp

Blair said French president Francois Hollande was "courageous" to intervene in Mali and warned that all "options" had to be considered when dealing with Syria.

He said the West could not rely on Russia to change its position on Syria, adding we "don't want to put all our eggs in that basket".

He said: "I do think that there are certain things we could do to strengthen the opposition and make it clear to Assad that in the end he is not going to win this, and he is not going to have a stalemate.

"It will end in defeat and it will end in his going, so the question is that is he prepared to do this on a basis that will allow us some chance to stabilise the country afterwards?

"Otherwise, the risk is that, and you see this from other countries that have been through the process of a revolution, you end up with a situation where the state starts to collapse.

"I don't think you are ever going to go in the sense of British troops on the ground but the question is what more you can do to help the opposition, and there are options there which are important to look at."

mali

A Malian man, Sadou, poses at his home with a machete to protect himself in case of attacks by Malian Islamist rebel groups

Blair said it was also necessary to build "capacity" in countries which needed support to deal with extremism while at the same time fighting al Qaida by better educating children in countries where al Qaida operated.

There was now an "identifiable ideology" visible in north Africa, the Middle East and central Asia, he added. But the "good news", Mr Blair said, was that the majority of people in countries affected by al Qaida wanted more prosperity.

He said: "My fear is that because this is being driven by an ideology with a very, very strong desire to push out from the borders of wherever they are, if we do disengage we will get a different set of problems further down the line which are more profound and more serious. That's the choice."

Loading Slideshow...
  • French Gazelle military helicopters, flying back from the city of Timbuktu, arrive at the French army base camp airport on January 28, 2013 in Sevare. (FRED DUFOUR/AFP/Getty Images)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows Chadian soldiers securing Gao airport, north of Mali, Saturday, Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows a Chadian soldier securing Gao airport, north of Mali, Saturday, Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows a Chadian soldier securing Gao airport, north of Mali, Saturday, Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows a Chadian soldier securing Gao airport, north of Mali, Saturday, Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows Malians soldiers arriving at Gao airport, north of Mali, Saturday, Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows Malian soldiers boarding a French Transall military plane in Bamako, Mali, Saturday Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • This picture provided by the French Army Communications Audiovisual office (ECPAD) and released Monday Jan. 28, 2013 shows Malian soldiers boarding a French Transall military plane in Bamako, Mali, Saturday Jan. 26, 2013. (AP Photo/Ghislain Mariette, EMA-ECPAD)

  • French Gazelle military helicopters, flying back from the city of Timbuktu, arrive at the French army base camp airport on January 28, 2013 in Sevare. (FRED DUFOUR/AFP/Getty Images)

  • A French Gazelle military helicopter, flying back from the city of Timbuktu, arrives at the French army base camp airport on January 28, 2013 in Sevare. (FRED DUFOUR/AFP/Getty Images)

  • A French Gazelle military helicopter, flying back from the city of Timbuktu, arrives at the French army base camp airport on January 28, 2013 in Sevare. (FRED DUFOUR/AFP/Getty Images)

  • A French Gazelle military helicopter, flying back from the city of Timbuktu, arrives at the French army base camp airport on January 28, 2013 in Sevare. (FRED DUFOUR/AFP/Getty Images)

  • A Malian soldier stands at a checkpoint near Sevare on January 27, 2013. (FRED DUFOUR/AFP/Getty Images)

  • A Malian soldier stands at a checkpoint near Sevare on January 27, 2013. (FRED DUFOUR/AFP/Getty Images)

  • Malian soldiers wait at a checkpoint near Sevare on January 27, 2013. (FRED DUFOUR/AFP/Getty Images)

  • Malian soldiers wait at a checkpoint near Sevare on January 27, 2013. (FRED DUFOUR/AFP/Getty Images)

  • French soldiers are waiting the arrival of the French Defence Minister before their departure to Mali on January 25, 2013 at the Miramas ZRA (Zone de Regroupement et d'Attente) military base, southern France, as part of the French military operation codenamed Serval.(GERARD JULIEN/AFP/Getty Images)

  • A Bin Laden sticker adorns the tank of a small motorcycle in Mopti, some 630 kms (400 miles) north of Mali's capital Bamako Thursday, Jan. 24, 2013. (AP Photo/Jerome Delay)

  • French soldiers return from patrol in Sevare, some 620 kms (400 miles) north of Mali's capital Bamako Thursday, Jan. 24, 2013. (AP Photo/Jerome Delay)

  • A U.S. Air Force transport aircraft with French military personnel and equipment aboard takes off for Mali from Istres airbase, near Marseille, southern France, Thursday, Jan. 24, 2013. (AP Photo/Claude Paris)

  • A French soldier stands guard as he arrives in the city of Diabaly, on January 21, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • A French soldier deployed near city of Diabaly keeps post from a machine gun mounted vehicle on January 22, 2013. (SANOGO/AFP/Getty Images)

  • Residents look at an abandoned Malian army tank in Diabaly on January 22, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • Malians walk past a burnt pickup truck mounted with a machine gun, which was formerly used by Islamists and destroyed after air strikes by the French air force a week ago, at a Malian military base which had been temporarily captured by Islamists, in Diabaly, on January 22, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • A French soldier deployed in Diabaly patrol on January 22, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • A man and woman on a scooter ride past a Malian soldier controlling a strategic bridge on the Niger river on January 22, 2013 near Markala, 270km North of Bamako. (ERIC FEFERBERG/AFP/Getty Images)

  • A French soldier stands next to a military truck near Malian army buildings which were taken by Islamic jihadists before being destroyed during aerial bombings, in the city of Diabaly, on January 21, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • French soldiers arrive in the city of Diabaly, on January 21, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • French soldiers arrive in the Malian town of Diabaly on January 21, 2013. (ISSOUF SANOGO/AFP/Getty Images)

  • A French Legionaire stands guard as groups from various units of the Air Force, Ground Army (Armee de Terre) and the French Foreign Legion fly out for a military operation in the north of Mali on January 21, 2013. (FABIO BUCCIARELLI/AFP/Getty Images)

  • A foreign press photographer shoots pictures of a man holding a French flg on a street of Bamako on January 17, 2013. (FRED DUFOUR/AFP/Getty Images)

  • A picture taken with a mobile phone on January 12, 2013 reportedly shows Islamist insurgents in Gao. (STRINGER/AFP/Getty Images)

  • A Malian man sells flags, including French ones, on a street of Bamako on January 17, 2013. (FRED DUFOUR/AFP/Getty Images)

  • A Malian man sells souvenirs, including French ones, on a street of Bamako on January 17, 2013. (FRED DUFOUR/AFP/Getty Images)

  • French helicopters are towed to the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • Mali National Guard soldiers stand guard on the military side of Bamako's airport Wednesday Jan. 16, 2013, as a commercial jet takes off during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • Mali's President Dioncounda Traore, center, visits the troops on the military side of Bamako's airport, Wednesday Jan. 16, 2013. (AP Photo/Jerome Delay)

  • Mali army cadets secure a perimeter on the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • Mali National Guard soldiers stand guard on the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • A Mali National Guard soldier stands guard on the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • A Mali gendarme directs traffic on the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • A Malian soldier stands guard on the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • Mali National Guard soldiers stand guard on the military side of Bamako's airport Wednesday Jan. 16, 2013, during a joined visit to French and Malian troops by Mali's President Dioncounda Traore and French Ambassador to Mali Christian Rouyer. (AP Photo/Jerome Delay)

  • This night vision photo provided by the ECPAD/French Army shows French military armored vehicles on Bamako airport, Tuesday, Jan.15, 2013. (AP Photo/Jeremy Lempin, ECPAD, EMA)

  • This photo provided by the ECPAD/French Army shows a Rafale jetfighter flying over Mali, Tuesday, Jan.15, 2013. (AP Photo/Adj Nicolas-Nelson Richard, ECPAD, EMA)

  • This photo provided by the ECPAD/French Army shows French soldiers carrying ammunition at Bamako airport, Tuesday, Jan.15, 2013. (AP Photo/Jeremy Lempin, ECPAD, EMA)

  • This photo provided by the ECPAD/French Army shows a Rafale jet fighter refueling over Mali, Tuesday, Jan. 15, 2013. (AP Photo/Adj Nicolas-Nelson Richard, ECPAD, EMA)

  • Members of pro-Islamic human rights groups gather in front of the French consulate in Istanbul, Turkey, Wednesday, Jan. 16, 2013 to protest against France's military intervention in Mali. (AP Photo)

  • Members of pro-Islamic human rights groups shout slogans in front of the French consulate in Istanbul, Turkey, Wednesday, Jan. 16, 2013 to protest against France's military intervention in Mali. (AP Photo)

  • An Ivorian officer (sitting) and other ECOWAS army officers prepare a document during a meeting of chiefs of staff on January 16, 2013 at the Mali peacekeeping traning center in Bamako. (ISSOUF SANOGO/AFP/Getty Images)

  • A soldier stands guard during a meeting by ECOWAS chiefs of staff on January 16, 2013 at the Mali peacekeeping traning center in Bamako. (ISSOUF SANOGO/AFP/Getty Images)