"They left the country illegally last December for Libya and they were able to train with weapons there," Tunisia's secretary of state for security, Rafik Chelly said.
The two gunmen were named by authorities as Yassine Abidi and Hatem Khachnaoui.
Chelly said that Abidi had been arrested before making his way to Libya, without providing details.
Wednesday's attack on the National Bardo Museum in central Tunis was the country's worst since the 2011 uprising that toppled strongman Zine El Abidine Ben Ali.
The security chief said the two gunmen had been "from sleeper cells" present in several areas.
"We know they can launch operations but we must piece together clues in order to conduct an arrest," Chelly said late on Thursday.
He named locations of several suspected training camps for Tunisians in Libya, including the second city Benghazi and the coastal town of Derna, which has become a stronghold for jihadists.
Authorities say as many as 3,000 Tunisians have gone to Iraq, Syria and Libya to fight in jihadist ranks, raising fears of battle-hardened militants returning home to plot attacks.

Latest News from World News Desk