The clash broke out at a rally of the banned Tehrik-e-Labaik Pakistan (TLP) on a highway in Sheikhupura, just outside Lahore, as the group prepared to march on the capital Islamabad, a spokesman for the Punjab police said on Wednesday.
Police said TLP activists armed with pistols and automatic weapons including AK-47 rifles opened fire on security forces controlling the demonstrators.
Rao Sardar Ali Khan, inspector general of the Punjab police, said four officers were killed and at least 263 wounded. TLP spokespeople said several of the group's activists had also been killed or wounded in the clash.
Thousands of TLP activists have been blocking Pakistan's busiest highway since Friday, demanding the release of their leader and the expulsion of France's ambassador over the publication of a series of caricatures depicting the Prophet Mohammad by a French satirical magazine.
After days of tension, including a clash last week in which three police officers were killed, the Interior Ministry ordered paramilitary Rangers to be deployed under anti-terrorism laws.
It is the group's third countrywide protest campaign since 2017 over caricatures which are considered deeply insulting by Muslims.
The French magazine Charlie Hebdo first published the cartoons in 2006 and republished them last year to mark the opening of a trial over a deadly attack on its offices in Paris by Islamist militants in 2015. Pakistani Information Minister Fawad Chaudhry said the government would use force to block the Islamists from entering the capital Islamabad.