BEIRUT, Lebanon — State television in Syria issued a withering attack late Monday on a longtime ally, the leader of the Palestinian militant group Hamas, Khaled Meshal, addressing him as if he were an ungrateful child, saying he was having a “romantic emotional crisis” over the Syrian uprising and accusing him of selling out “resistance for power.”

The extraordinary reproof, a departure from the blander tone of most official Syrian statements, was the government’s first broadside against Hamas since the organization distanced itself from the embattled President Bashar al-Assad this year, when most Hamas leaders left their refuge in Damascus and shuttered their office there.

The attack was an editorial delivered by a newscaster in alternately stern and mocking tones, who reminded Mr. Meshal that he was “orphaned” by Arab countries who would not take him in when he fled Jordan in 1999. She implied that he must have sold out to Israel, saying that was the only explanation for the willingness of Qatar, his new host, to accept him.

Damascus seemed to be striking back after Mr. Meshal appeared at a congress of the party of Turkey’s prime minister, Recep Tayyip Erdogan, and after Mr. Erdogan and Egypt’s president, Mohamed Morsi, pointedly declared their shared priorities of opposing Mr. Assad and supporting the Palestinians — a blow to Mr. Assad’s longstanding and domestically compelling persona as the champion of Palestinian resistance against Israel.