Hundreds of villagers fled their homes in Nigeria's northeast late on Saturday after an attack by Islamist militants from the Boko Haram group, militia officials and witnesses said.
No casualties were reported but the raid highlighted fragile security in Nigeria's northeast, where the army is still battling to end a conflict that erupted in 2009.
Militants arrived in trucks in Jimmi, 5 km (3 miles) from Maiduguri city, and opened fire, setting homes ablaze and also attacking an informal refugee camp.
"Boko Haram terrorists this evening attacked Jimmi village," militia leader in Maiduguri Musa Ari said. "They burnt homes in Jimmi and tents in the camp."
Military authorities scrambled reinforcements and fighter jets to repel the attack, said militia leader Ibrahim Liman.
Panicked villagers from the area fled to nearby Maiduguri, capital of Borno state which along with neighbouring Yobe state has been at the centre of the jihadist insurgency.
"We left our village to escape Boko Haram who attacked our neighbours in Jimmi," said Bale-Shuwa village resident Suleiman Balarabe.
He said villagers saw military jets flying overhead towards Jimmi.
"The sounds of guns coming from Jimmi terrified us and made us leave our homes because we were afraid they were going to attack our neighbourhood," said Sanda Gini, a resident of Jiddari-Polo area on the outskirts of Maiduguri.
In April, scores of Boko Haram fighters launched a gun and suicide attack on Jiddari-Polo when they advanced on Giwa barracks where hundreds of their militant comrades are being detained.
Insurgents fired automatic weapons and rocket-propelled grenades at troops before they were repelled with aerial support.
Despite government insistence Boko Haram jihadists are near defeat, in recent months the militant group has carried out major attacks on military targets, killing dozens.
Boko Haram's nine-year conflict has killed an estimated 27,000 people and displaced two million, creating a humanitarian crisis and spilling into Nigeria's northern neighbours