By Mahamat Ramadane and Madjiasra Nako
N'DJAMENA (Reuters) -Foreign leaders arrived in Chad on Thursday for the funeral of slain president Idriss Deby as France backed the new military leaders in the face of rebel threats to resume an offensive on the capital N'Djamena.
French President Emmanuel Macron, Guinean President Alpha Conde and several other African heads of state arrived in N'Djamena despite warnings from the rebels that foreign leaders should not attend Friday's funeral for security reasons.
A military council led by General Mahamat Idriss Deby took power after his father, who had ruled for 30 years and was a close ally of Western powers in the fight against Islamist militants, was killed in battle with the rebels on Monday.
General Deby, 37, has said the army will hold democratic elections in 18 months, but opposition leaders have condemned his takeover as a coup d'etat and an army general said many officers were opposed to the transition plan.
The Libya-based rebels, who are not linked to the Islamists, said on Wednesday they would end a brief ceasefire at midnight and were about 200-300 km (125-190 miles) from the capital.
They could not be reached for comment on Thursday. A Chadian military source told Reuters that as of mid-day there was no rebel activity.
France, Chad's former colonial ruler, defended the military takeover on Thursday, saying it was necessary for security amid "exceptional circumstances".
French Foreign Minister Jean-Yves Le Drian said the military was justified in its actions as the speaker of parliament had declined to take charge.
"Logically, it should be (speaker Haroun) Kabadi ... but he refused because of the exceptional security reasons that were needed to ensure the stability of this country," Le Drian told France 2 television.
Macron met General Deby on Thursday evening, a source at the French presidency said.
Deby, although criticised by human rights groups for his repressive rule over three decades, was a lynchpin in France's security strategy in Africa.
About 5,100 French troops are based across the region as part of international operations to fight Islamist militants and France has its main base in N'Djamena.
Dissent within the military has raised concerns about stability in Chad.
"Kaka (Mahamat Deby) only has partial support of the army. He is young and, unlike his father, has never been a rebel," said Jerome Tubiana, an analyst specialising on Chad.
"Within the army, there's indeed (at least) two groups."
Deby, 68, was killed on the frontline against fighters of the Front for Change and Concord in Chad (FACT), a group formed by dissident army officers in 2016 which says it is pro-democracy.
Despite FACT's threat about security at the funeral, people went about their business as usual in N'Djamena on Thursday, with some saying they were frustrated and worried about the situation.
"We are tired of war. We have seen what is happening in neighbouring countries like Libya, CAR, Nigeria and Niger. Every time we find peace to construct the country, a band of discontented people sets us back," said Issa Mahamat Oumar.
Neighbouring Nigeria reinforced security along its border to avoid a potential influx of Chadian refugees, its defence minister said. Central African Republic's army said it was on maximum alert to prevent armed groups from crossing the border.
Even if FACT is not powerful enough to take on the new military council, the risk of instability is high, a Western diplomat said.
"This rebel group on its own may not be enough of a threat to bring down the government. But other groups might exploit this moment," said the diplomat, who spoke on condition of anonymity. "Young Deby will probably have to strike some deals to get enough people behind the transition."
(Reporting by Mahamat Ramadane and Madjiasra Nako; Additional reporting by David Lewis in Nairobi, John Irish in Paris, Felix Onuah in Abuja and Judicael Yongo in Bangui; Writing by Nellie Peyton and Aaron Ross; Editing by Angus MacSwan and Grant McCool)