LAHORE, Pakistan — The professor was working in his office here on the campus of Pakistan’s largest university this month when members of an Islamic student group battered open the door, beat him with metal rods and bashed him over the head with a giant flower pot.

Iftikhar Baloch, an environmental science professor, had expelled members of the group for violent behavior. The retribution left him bloodied and nearly unconscious, and it united his fellow professors, who protested with a nearly three-week strike that ended Monday.

The attack and the anger it provoked have drawn attention to the student group, Islami Jamiat Talaba, whose morals police have for years terrorized this graceful, century-old institution by brandishing a chauvinistic form of Islam, teachers here say.

But the group has help from a surprising source — national political leaders who have given it free rein, because they sometimes make political alliances with its parent organization, Jamaat-e-Islami, Pakistan’s oldest and most powerful religious party, they say.