Two militants groups released a joint statement on Thursday that said: "All nationals and those who work in the diplomatic corps of these countries can be considered targets of the Popular Resistance Committee and Al-Aqsa Martyrs Brigades."
Abu Mudjahid, a spokesman for the "joint command" of the two factions, said the threat was serious and extended to the nationals of all countries that had published the caricatures.
"We demand that the offices and consulates of the three countries concerned close, otherwise we will not hesitate to destroy them," the statement said.
In the Gaza Strip, a dozen gunmen from the militant group Islamic Jihad and an armed faction of Fatah known as the Yasser Arafat brigade surrounded the EU compound and fired into the air. They demanded an apology within 48 hours over the cartoons.
The threats came as the managing editor of a French daily that republished the cartoons was sacked.
The sketches were originally printed in a Danish paper in September and have riled many Muslims.
They were reprinted on Wednesday in France Soir and several other European papers by way of rallying to defend freedom of expression.
"Yes, We Have the Right to Caricature God"
France Soir headline
Jacques Lefranc, the managing editor of France Soir, was fired by the publication's owner Raymond Lakah, an Egyptian magnate.
No reason for the decision was announced.
Islamic tradition bars any depiction of Prophet Muhammad to prevent idolatry. The drawings have prompted boycotts of Danish goods and bomb threats and demonstrations against Danish facilities, and have divided opinion within Europe and the Middle East.
The cartoons include an image of Muhammad wearing a turban shaped as a bomb with a burning fuse, and another portraying him holding a sword, his eyes covered by a black rectangle.
The front page of France Soir on Wednesday carried the headline "Yes, We Have the Right to Caricature God" and a cartoon of Buddhist, Jewish, Muslim and Christian gods floating on a cloud.
The publication drew a stern reaction from the French foreign ministry. It said that while freedom of expression is dear to France, the ministry "condemns all that hurts individuals in their beliefs or their religious convictions".
There are an estimated five million Muslims in France.