(NBC News) - U.S. fighter jets launched airstrikes against an ISIS compound in Libya overnight as they targeted a terrorist linked to a tourist massacre, American military officials said.

Dozens of people were killed in the bombing raid on the coastal city of Sabratha, local officials and activists said. Warplanes struck a house 6 miles outside the city center, Sabratha's municipal administration said.

A senior U.S. official told NBC News the airstrike likely killed Tunisian ISIS operative Noureddine Chouchane.

Experts said the 36-year-old had been linked to terror attacks — including last year's shooting at the Bardo Museum in Tunis which left 23 people dead — although his exact role was unclear.

Sabratha is close to the Tunisian border and one of the areas where Western officials say ISIS militants had some presence as part of their expansion in the North African state.

Citing hospital figures, the city council said 41 people were killed and 6 wounded in the airstrike, which took place at 3:30 a.m. Friday (8:30 p.m. Thursday ET).

It said the bombed building was being used by Tunisians, including ISIS militants and that machine guns and rocket-propelled grenade launchers were found under the rubble.

The raid came after President Barack Obama warned that Washington was prepared to strike inside Libya. "We will continue to take actions where there is a clear target in mind," he said Tuesday.

Sabratha, which had a population of about 100,000 at the time of Libya's 2004 census, lies on the Mediterranean coast about 40 miles west of Tripoli. It is home to a UNESCO-protected archaeological site of Roman ruins.

The dead were mostly Tunisians according to the Sabratha Media Center, which describes itself as an NGO founded by a group of local journalists.

"To those asking if they were ISIS or not, we ask for them to wait and be patient, because foreigners lived in the [targeted] house, mostly Tunisians. Tomorrow we will know in details," it said a post on social media.

Secretary of State John Kerry said earlier this month that Libya was emerging as a particular concern in the fight against ISIS.

He said the failing state was a breeding ground for jihadists who could take over abandoned oil fields.

"The last thing in the world you want is a false caliphate with access to billions of dollars of oil revenue," Kerry said.

Tunisia, which shares nearly 400 miles of border with Libya, has been worried for weeks about what they understood to be an "imminent" strike by the U.S.-led coalition targeting ISIS.

Tunisia recently built nearly a wall of sand and trenches to fortify its border amid concern about militants, arms traffickers and refugees entering its territory.