KARACHI, Pakistan — Clashes between the police and protesters outside the French Consulate in Karachi on Friday left four people, including two journalists, with gunshot wounds as demonstrations erupted across Pakistan against the satirical newspaper Charlie Hebdo and its publication of cartoons depicting the Prophet Muhammad.

The Karachi protest was led by the student wing of Jamaat-e-Islami, the country’s largest religious party. The demonstrators threw stones at riot police officers, who responded with tear gas, water cannons and gunfire.

A photographer for Agence France-Presse, Asif Hassan, was shot in the chest and was “out of danger” after emergency surgery, said Dr. Seemi Jamali, head of the emergency ward at the Jinnah Postgraduate Medical Center in Karachi. The news agency said it was trying to determine whether Mr. Hassan had been specifically targeted.

Protests in other Pakistani cities passed largely peacefully, but they were the first major reaction since Charlie Hebdo published an issue depicting Muhammad holding a sign that read, “I am Charlie.” The issue was the newspaper’s first after an attack by jihadist gunmen killed 12 people in and around its office in Paris.