Chad's President Idriss Deby, a wily survivor of rebellions, is looking to bolster his powerbroker role in the Sahel and his nation's own security by backing peace talks between neighbor Nigeria's government and Islamist Boko Haram insurgents.
The Boko Haram rebels, whose five-year revolt has killed thousands and caused mayhem in the northeast of Africa's biggest economy Nigeria, have been threatening Chad's own frontiers and disrupting cross-border trade.
With jihadist fighters prowling Libya's deserts to the north, al Qaeda in the Islamic Maghreb active in the west, and rebels and janjaweed militia battling in Sudan's Darfur region to its east, Chad already finds itself in the eye of the storm.
Deby, a former fighter pilot who took power in a 1990 coup, survived offensives by Sudan-backed rebels in 2006 and 2008. He can ill afford a violent Islamist onslaught by Boko Haram in the southern Lake Chad border region of his oil-producing nation.
To pre-empt this threat, Deby's government quietly started in September mediating negotiations between Nigeria and Boko Haram, aimed at securing the release of 200 schoolgirls seized in April in the northeast Nigerian town of Chibok. Nigeria's military unexpectedly made the initiative public last month.
Chad says the peace talks are still on track despite a recently released video that appears to show Boko Haram leader Abubakar Shekau saying the Chibok girls had been "married off" to his fighters, contradicting an earlier announcement of a deal to release them.
"We have a huge interest in resolving these talks," said a senior Chadian diplomat, adding that Boko Haram's activities in the porous frontier around Lake Chad were difficult to control.
"We're worried that they'll come here next."
A breakthrough on the talks would help Deby strengthen his reputation as a regional powerbroker, a role welcomed by former colonial ruler France as it seeks to stop being 'Africa's policeman' and hand that job to local African allies.
"One reason for Chadian involvement is the country's posturing as a regional hegemon," said Ryan Cummings, chief analyst at crisis management group Red 24.
Chad's army is considered one of Africa's most battle-ready and played a frontline role alongside the French in an operation in 2013 against Islamic fighters in Mali's desert north.
Its soldiers also formed the backbone of an African Union peacekeeping mission in Central African Republic to the south, until they withdrew after U.N. accusations of killing civilians.
Last year, Chad earned a seat on the U.N. Security Council and Deby has gained prominence chairing regional summits.
BOKO HARAM SLEEPER CELLS "WAKING UP"
But if the talks being brokered by Chad fall through, Deby's government not only risks losing face but also an opportunity to defuse the threat from the Nigerian militant group whose center of activity in Nigeria's northeast Borno State is menacingly less than 100 km (60 miles) from the Chadian capital.
A video, seen by Reuters, of the executions in September of Chadian herdsmen by a group identified as an offshoot of Boko Haram in Chad is viewed by local politicians and residents as evidence of the feared spillover of the Islamists' violence.
The leader of the faction shown in the video, Abdel Aziz, mimics the posturing of Boko Haram leader Shekau but speaks the Boudouma language used in the border area of Chad and Nigeria.
"A couple of months ago we talked about sleeper cells of Boko Haram in the lake region," said a security source in Chad working for an international organization. "But we can't say that any more because they have started waking up."
In recent months, Chad has changed its attitude to Boko Haram. Chadian forces are stepping up surveillance and have made several arrests, residents and security sources say. It has also pledged 700 troops for a cross-border force in the Lake Chad region to counter the group, due to start operations this month.
France, which uses N'Djamena as a base for its Operation Barkhane against jihadists in the Sahel, is monitoring Boko Haram activities in Nigeria and assists the Chadian army.
A diplomatic resolution to the Boko Haram issue could also help Deby, serving his fourth term and with no clear rivals for the coming 2016 election, to stave off pressure from Western partners to make further steps towards democratization.
"By increasing Chad's strategic importance in the region, he has made himself an indispensable ally to key international partners who will both ease pressure on him to reform, and potentially intervene in the event that threats to his regime increase," said Roddy Barclay at Control Risks.
REGIONAL TRADE SUFFERS
For the moment, Chadian soldiers in camouflage sit idle beneath patches of shade on N'Djamena's sun-drenched boulevards, and the capital seems once again in tune with its Arabic name, meaning "Place of Rest".
The trees outside the presidential palace have grown back but still bear the scars of Chad's turbulent past. In 2008, as Sudanese-backed rebels bore down on Deby's heavily fortified stronghold through the streets of the capital, they were hacked back to stumps to destroy any cover.
A dwindling group of presidential guards fought the rebels from trenches outside the palace but at the last minute France stepped in to save Deby. It provided intelligence and logistical support for Deby's troops, giving him a critical advantage over insurgents in pick-up trucks mounted with machine guns.
But pillaging by Boko Haram fighters of trade routes in Nigeria and Cameroon, two of Chad's main commercial partners, has already cut commerce to the landlocked Sahel state, in a sign of how much it stands to lose from a widening insurgency.
In the twisting corridors of N'Djamena's Grand Marche, where generators roar to power electric fans in the midday heat, shopkeepers say their livelihoods have been affected by the drop in commerce with northern Nigeria and Cameroon.
Abdullah Mega, a 30-year-old shopkeeper in a silver boubou robe seated on a red prayer mat, said a seven-vehicle convoy carrying his shipment of appliances was robbed and torched on the road from the northeastern Nigerian town of Maiduguri last year.
He says that he has started importing merchandise from Dubai instead, but complains the extra costs are crushing his margins.
"Nigeria is an extension of our own house and that's the room where we can make the profits," he said.
Cattle trading, the second biggest business for Chad after oil, has also been hurt by the deterioration in security.
Ali Baigou, head of a union representing herders, says its members lost more than 8,000 cattle in two Boko Haram attacks in August in northern Nigeria as they headed to a regional market.
"The government should stand up against this," he said.