GAZA —A leader of Hamas spoke out against President Bashar al-Assad of Syria on Friday, throwing its support behind the opposition and stripping Damascus of what little credibility it may have retained with the Arab street. It was Hamas’s first public break with its longtime patron.

Hamas’s prime minister in Gaza, Ismail Haniya, said during Friday Prayer, “I salute all people of the Arab Spring, or Islamic winter, and I salute the Syrian people who seek freedom, democracy and reform.”

The worshipers shouted back, “God is great” and “Syria! Syria!”

Mr. Haniya made his remarks in support of the uprising that is seeking to oust Mr. Assad, a reversal after years in which Mr. Assad has given safe haven to leaders of Hamas while helping supply it with weapons and cash in its battle against Israel.