“We know he was a member of a dance club and was familiar with the tourism sector, having worked in it as an events organiser,” Essid told the French-language newspaper La Presse.
Tourists fled in horror as 23-year-old Seifeddine Rezgui pulled a Kalashnikov assault rifle from inside a furled beach umbrella and went on a shooting spree outside a five-star hotel.
The attack at Port El Kantaoui, north of Sousse, killed 30 Britons, three Irish nationals, two Germans, one Belgian, one Portuguese and a Russian.
The assailant was himself later shot dead by police.
Both the authorities and relatives later described the gunman as having been an apparently normal young Tunisian who had been keen on breakdancing.
A resident near where his parents live in the town of Gaafour had previously told AFP that Rezgui worked “in tourism in the area of Kantaoui”, where the attack is thought to have been planned, although there had been no confirmation of this from another source.
The attack on the beach and around the swimming pools of the Riu Imperial Marhaba Hotel was claimed by the Islamic State group.
On Saturday, eight days after the deadly rampage, President Beji Caid Essebsi declared a state of emergency, saying the attack had left Tunisia facing a “special type of war”.