The killing of 12 people at a French satirical weekly on Wednesday is incompatible with the Muslim religion, said Saudi Arabia, the home of Islam's holiest sites.
"The Kingdom of Saudi Arabia has followed with deep sorrow the terrorist attack" at the Charlie Hebdo magazine, the state Saudi Press Agency said, citing an unnamed official source.
It said the source condemned "this cowardly terrorist attack which is incompatible with Islam".
Prosecutors said witnesses heard the gunmen shout "we have avenged the prophet" and "Allahu akbar" (God is greatest) while they carried out the attack.
Charlie Hebdo had published controversial cartoons of the prophet Mohammed, whose migration from Mecca to Medina in 622 marked the beginning of the Muslim era.
France and Saudi Arabia enjoy friendly relations.