TUNIS, Tunisia — The young college student who killed 38 tourists in a Tunisian seaside resort was in a jihadi training camp in western Libya at the same time as the two attackers who hit the National Bardo Museum in March, a top security official said Tuesday.
The revelation confirms repeated fears that the strong presence of the Islamic State group in neighboring Libya has become a direct threat to Tunisia, the only democracy to emerge from the Arab Spring uprisings.
"It has been confirmed that the attacker trained in Libya with weapons at the same period as the Bardo attackers," said Rafik Chelli, the secretary of state for the Interior Ministry. "He crossed the borders secretly."
Chelli said Seifeddine Rezgui, a 24-year-old Master's student in electrical engineering, left his studies at Kairouan University and sneaked into the western Libyan town of Sabratha in January, which is when the two young men who carried out the museum attack in Tunis were there. Previously authorities had said there was no evidence he had left the country.
Sabratha is also the site of famed Roman ruins. It is one of several places in Libya where radical Islamic groups, like IS which claimed responsibility for the beach attack, have training camps.
Some 3,000 Tunisians have left to fight with radical groups in Syria and Iraq, usually via Libya where they received training. Increasingly, however, they have stayed in Libya before returning to carry out attacks in Tunisia.
Tunisia's most well-known Islamic radical Seifallah Ben Hassine, fled to Libya in 2013 taking many supporters with him into exile.
In the wake of last week's devastating attack on the beach near Sousse, there has been criticism of the government's handling of security, especially since tourists had clearly become a target after the museum attackers killed 22 people in March.
President Beji Caid Essebsi revealed Tuesday morning that heightened security measures had been scheduled to be put in place just days after the beach attack.
"It is not a perfect system — it is true we were surprised by this affair," he told Europe 1 radio. "They took measures for the month of Ramadan but they never thought the attack would be on the beaches against tourists and the system of protection was set to start July 1."
He added that an investigation was underway into security failures, and there would now be armed tourist police on the beaches and army reservists had been called up.
Essebsi also said the country needed international help in securing its lengthy frontiers with Libya. The United States has already given millions in military equipment to help in this mission.
Some 80 mosques outside state control and known to propagate extremist messages are also set to be shut down. Interior Ministry official Walid Louguini told local radio the first of them were closed Tuesday, along with pro-jihadi social media sites.
Essebsi, 88, is a veteran of Tunisia's pre-revolutionary regime and was elected last fall on a platform of restoring security and dignity to the state.
Tunisia's vital tourism sector suffered a staggering blow from the attack, with tourism officials expecting losses to the economy this year of half a billion dollars.
At least 25 of the victims were British, according to the latest figures from Tunisia's Ministry of Health. The ministry said 33 of the 38 victims have now been identified, also including 3 Irish, 2 Germans, a Belgian, a Portuguese and a Russian.
The rampage continued for around half an hour before the gunman was shot by police.
All wounded Britons have been repatriated, including four severely injured people who were brought back by a Royal Air Force C17 transport plane. British Prime Minister David Cameron's office said the bodies of the dead would be flown back starting Wednesday.
In a press conference late Monday, Tourism Minister Samia Elloumi outlined a series of measures to cushion the industry from the expected losses.
She said debts and taxes for tourist companies would be rescheduled, new loans guaranteed by the state would be offered and transport taxes for non-resident Tunisians would be cut.
Most important for foreigners, the $15 departure tax will be scrapped and visa requirements will be lifted for visitors from China, India, Iran and Jordan.
A current tourism promotion campaign would also be pulled.
"It would be indecent and not send a positive message to put out such a campaign while the bodies of the victims are still there and people remain in shock," she said.
Associated Press writers Paul Schemm in Rabat, Morocco and Jill Lawless in London contributed to this report.