Adama Diarra / Reuters file
Militiaman from the Ansar Dine Islamic group, who said they come from Niger and Mauritania in northeastern Mali in June.
Algeria, a key power in north Africa, has given tacit approval for African-led military intervention to stop Islamic militants in neighboring Mali, sources in Algeria and France said.
The former French colony shares a 1,200-mile border with Mali, and is wary of any outside interference and conflict spilling over its borders.
It fears military action in Mali could push al-Qaida militants back into southern Algeria as well as triggering a refugee and political crisis, especially among displaced Malian Tuaregs heading north to join tribes in Algeria.
Although Algiers would not be able to veto an operation, it would be diplomatically risky for African countries backed by Western powers to intervene in Mali without Algeria's consent, especially as the conflict could drag on for many months.
However, after weeks of diplomatic cajoling led by France, Algiers has now reluctantly agreed that foreign troops will be needed to eradicate the Islamist threat.
Algeria is Africa's biggest country and a top oil and gas exporter and has the largest military in Africa, and second-largest in the Middle East after Egypt.
It continues to rule out any direct support to the mission.
"At the end of the day, we won't oppose a military intervention in Mali as long as foreign troops are not stationed on our soil,'' said an Algerian source informed about discussions on Mali.
With six hostages held by the Islamists and fearful of an attack on home soil, France is eager for swift action.
"Algeria now accepts the principle of a military intervention, which wasn't the case before," a senior French diplomat said.
He said the change in position came after a high-level meeting in the Malian capital Bamako on Oct. 19 that brought regional and international players to the negotiating table.
A French defense ministry source said there was "tacit'' agreement and that Paris did not expect more from Algiers.
Algeria has repeatedly advocated a diplomatic solution in Mali since Tuareg rebels and Islamists captured two thirds of the country after an army coup in Bamako in March. The Islamist militants, some linked to al-Qaida, later hijacked the revolt.
The Bamako meeting followed a French-drafted U.N. Security Council resolution urging Mali to engage in dialogue with Tuareg Islamist rebels Ansar Dine if they cut links with radical groups, a move that satisfied Algiers' calls for dialogue.
Paris had until now considered Ansar Dine among the al Qaida-linked groups and refused to negotiate with them.
The resolution also asked African states and the United Nations for a Mali military intervention plan within 45 days.
A second Algerian official said Algiers would do its best to find a diplomatic solution, but could also potentially support Malian troops by providing weapons for a future operation.
When a coup in March removed President Amadou Toumani Toure, it revealed a deep rot in a country once seen as a model of democracy for the region. Bamako had tried to run Mali's north through alliances with a local elite involved in criminality — rather than by tackling long-standing issues — and that accelerated the collapse as a power vacuum persisted.
Al-Qaida's north African wing, led by two Algerians, Mokhtar Belmokhtar and Abou Zeid, has extended its influence partly through loose alliances. Its partners include Ansar Dine, a group of Tuareg-led rebels seeking to impose sharia, and the Arab-dominated MUJWA, say both local and Western officials.
Money from criminal enterprises has enabled the Islamists to outgun rival rebel groups. "(The Islamists) can afford to pay people but we cannot," said Mohamed Attaher, a senior official with MNLA, a rebel group that kicked off an uprising in January but in June was pushed out of areas it controlled by MUJWA.
The United Nations has evidence that Islamists enlisting children in Mali's north are paying their families a one-off fee of about $600 for each new young fighter, plus monthly payments of about $400, according to Ivan Simonovic, the U.N.'s Assistant Secretary-General for Human Rights.
In Washington, U.S. Defense Secretary Leon Panetta voiced concern about the presence of AQIM in Mali, but stressed the need to work with countries in the region to address it.
"We need to work with the nations in the region. They all agree that we're facing the same threat there from AQIM," Panetta said, adding any future operations would have to be developed and executed "on a regional basis."
"And so our goal right now is to try to do everything we can to bring those countries together in a common effort to go after AQIM."
U.S. Secretary of State Hillary Clinton is expected to talk with Algerian officials about Mali when she visits the country early next week.
Diplomats say any intervention in northern Mali is still some months away with a three-phased plan likely to consolidate the south first, followed by an operation to re-take northern cities and finally a mission to go after militants.
In anticipation, Algerian Prime Minister Abdelmalek Sellal told lawmakers extra troops had been sent to secure Algeria's borders.
"We won't allow any threat to harm our nation," he said. "Algeria wants to avoid having terrorist dens at its frontiers."
The change in Algeria's position comes amid an improvement in ties with France 50 years after it gained its independence.
In a symbolic gesture before a state visit to Algeria in December, President Francois Hollande acknowledged for the first time last week that Algerians were massacred at a 1961 pro-independence rally in Paris. Historians say more than 200 may have been killed in the police action.
Riccardo Fabiani, North Africa analyst at Eurasia Group, said there was still a clear red line for Algeria which was that it would not intervene or commit troops.
"They are adopting a sort of benevolent neutrality. The Algerians are going to stand by and watch. I can't see collaboration at any level other than intelligence sharing."
More world stories from NBC News:
- Olympic medals 'stolen' as athletes party at nightclub
- BBC ripped for handling of sex abuse scandal tied to former host
- Hate crimes rise, far right strengthens as Greece economy sinks
- Top 10 foreign policy issues facing a new president
- How a viral death rumor pushed Fidel Castro out of retirement