University students in California have launched a campaign to stop the TV host Bill Maher from giving a commencement address because of his “dangerous” views on Islam and other religions.

An online petition to remove the TV host as a keynote speaker at a UC Berkeley commencement ceremony had drawn more than 2,500 signatures by Tuesday morning.

“Bill Maher is a blatant bigot and racist who has no respect for the values UC Berkeley students and administration stand for,” said the Change.org petition. “In a time where climate is a priority for all on campus, we cannot invite an individual who himself perpetuates a dangerous learning environment.

Maher made headlines in recent months by assailing Islam on his HBO show Real Time. “Islam is the only religion that acts like the mafia that will fucking kill you if you say the wrong thing,” he said during a discussion with the actor Ben Affleck.

After last week’s shooting at the Canadian parliament the comedian and political commentator tweeted: “Turns out the attacker was Islamic – what are the odds, huh? It’s almost like there’s an elephant in the room.”

Maher revels in challenging political correctness, irrationality and conspiracy theories, and mocks all organised religion. He undertook a fake spiritual journey in the 2008 documentary Religulous. He sharpened his critiques of Islam after the September 11 terror attacks, referring to himself as a “9/11 liberal”.

Berkeley is a liberal bastion which has long championed free speech. The petition urging the university to rescind the invitation did not violate that tradition, Marium Navid, a student senator, told the Guardian.

“He is entitled to criticise religion. Every ideology deserves to be criticised and every individual has the right to criticise those ideologies. But don’t make generalisations that can perpetuate bigotry and racism.”

Navid said she had no problem with Maher coming to Berkeley to speak at another forum, such as a debate, but not at a commencement speech which gave an elevated platform with no opportunity for questions or dialogue.

Maher’s publicist did not immediately respond to a request for comment.

Student protests at other elite universities have prompted other scheduled speakers to withdraw, or have their invitations rescinded, or honorary degrees pulled, for a range of perceived offences.