By Boureima Balima and Emma Farge

NIAMEY/DAKAR (Reuters) - Chad has withdrawn hundreds of troops from neighboring Niger, where they were helping local forces fight Boko Haram Islamist militants, humanitarian sources and officials said.

The pull-out over the past two weeks could weaken a region-wide struggle against the militants who have killed tens of thousands of people, forced many more to flee and triggered a humanitarian crisis.

There was no immediate explanation or comment from defense officials in Chad.

But the move came a month after the vast central African country complained about an unexpected U.S. travel ban imposed on its nationals. Chad warned at the time the order could affect its security commitments - which include its involvement in the U.S.-backed fight against Boko Haram.

Residents said the withdrawal had already had an impact on Niger's Diffa region, which has seen a string of attacks by Boko Haram militants crossing over from their base in neighboring Nigeria.

Ibrahim Arimi from the border village of Bosso said banditry had increased since the Chadian troops started leaving and he had been temporarily moved to another village for safety.

Diffa parliamentarian Lamido Moumouni said residents had started complaining. "They have come to rely on the forces so there is a perception that security will be lacking," he said by telephone.

At its peak in 2016 after an attack in Bosso, Chad had 2,000 troops in Niger to help counter Boko Haram although security sources said this has fallen since.

Boko Haram has attacked Chad, Niger and Cameroon from its base in northeast Nigeria. Its eight-year bid to carve out an Islamist caliphate has driven millions from their homes - more than 200,000 of them are now based in Diffa, with little prospect of returning home.

Thousands of them are camped alongside an unfinished highway in the middle of a barren savannah with few resources.

Chad's soldiers also occupy front-line positions in a peacekeeping force in northern Mali. Falling oil revenues after the price crash in 2014 has also sapped Chad's appetite for expensive regional security commitments, analysts say.

(Additional reporting by David Lewis in Nairobi, Madjiasra Nako in N'djamena and Sofia Christensen in Dakar; Editing by Andrew Heavens)