Investigators are searching for one or more accomplices in an attack on a luxury hotel in a Tunisian beach resort that killed at least 38 people, some of them sunbathers on the beach, an official said Sunday.

The father and three roommates of the attacker were detained and being questioned in the capital, Tunis, Interior Ministry spokesman Mohamed Ali Aroui told The Associated Press. The attacker has been identified as Seifeddine Rezgui, a 24-year-old graduate of Tunisia's Kairouan University where he had been living with the other students.

"We are sure that others helped, but did not participate," Aroui said. "They participated indirectly."

A security official close to the investigation confirmed news reports indicating that a swimmer had found the attacker's cellphone in the Mediterranean. The phone showed the attacker spoke with his father just before his assault, the official said on condition of anonymity because he wasn't authorized to speak publicly.

Authorities believe the suspected accomplices provided the Kalashnikov assault rifle to Rezgui and helped him get to the scene, Aroui said. Ballistic tests showed the bullets came from that single weapon, and the attacker was carrying four cartridges of ammunition — all were found by investigators, he said.

Shortly after Friday's shooting spree, Aroui had initially said that two people were involved in the attack before backtracking on that assertion. To some, the long duration of the assault — reportedly lasting nearly 30 minutes — and the high casualty count might indicate that more than one gunman was involved.

The attacker methodically moved from the beach to the hotel's swimming pool, reception and other areas in a massacre that stands as Tunisia's worst terror attack. The death toll surpassed the 22 people killed in March at The National Bardo Museum outside Tunis — again mostly tourists in a country known for its beaches and rich history.