The men detained were mostly traders and sellers in the popular market in Libreville where the attack occurred on Saturday. All are from west Africa.
An official said they were taken to police headquarters, where they are due to be questioned.
“Operations are ongoing,” government spokesman Alain-Claude Bilie By Nze told AFP. “We are not commenting at this stage.”
National Geographic confirmed that the targets of the attack were working for the organisation.
“We are deeply saddened to confirm the reports that the two Danish nationals horrifically attacked in Gabon are members of the National Geographic family,” it said in a statement.
“We are in direct contact with the victims and the Danish production company with whom they were on assignment, and our main objective is to support their recovery and safe return to Denmark.”
Police said the assailant is a 53-year-old Nigerien man who, according to witnesses, shouted “Allahu akbar” (God is greatest) during the attack.
The man, who has lived in Gabon for 19 years, said in his first statements that he “acted in retaliation for US attacks against Muslims and America's recognition of Jerusalem as Israel's capital,” Defence Minister Etienne Massard said.
Residents said the man was from the Muslim Hausa/Fulani community and sold smoked meat from a cart in the city and in the market.
“We are still gathering information,” Bilie By Nze said.
The market in Libreville, popular with tourists, was shut down after the incident and remained closed on Sunday, with security forces manning the gates.
Authorities have said the attack appeared to be politically motivated, but have not publicly classified it as terrorism.
Gabon, a small French-speaking former colony with 1.8 million inhabitants, has so far been spared the Islamist-inspired attacks that have taken place in some neighbouring countries.
READ ALSO: Attacker wounds two Danes in Gabon, claims it is attack on US