DAKAR, Senegal — The Islamist terrorist group Boko Haram on Friday morning struck across Nigeria’s border into Niger for the first time, broadening the regional conflict to a fourth country in West Africa.

Boko Haram fighters crossed the Komadougou River separating Nigeria from Niger and attacked Bosso, a remote town that is a local seat of government with an open-air market that has been sheltering thousands of refugees from the conflict.

An army officer in Niger said the fighters were pushed back after at least three hours of combat. Speaking from Niamey, the capital, the officer said all the Boko Haram fighters who entered Bosso were killed. Other Niger government officials could not be reached on Friday afternoon, and phone lines to Bosso, on Niger’s eastern edge, were not working.

“We are in control of the situation,” said the army officer, who spoke on the condition of anonymity because he was not authorized to speak publicly. “Anybody who entered the town, nobody came out alive,” the officer said. He would not say whether any troops or any civilians in Bosso had been killed. “People heard gunfire and went home.”