AMMAN, Jordan (AP) - Kurdish rebels freed the local commander of an al-Qaida-linked group in a town near Syria's northern border with Turkey in return for 300 Kurdish civilians detained by the group, as part of an agreement to end rebel infighting that erupted a day earlier in the region, activists said Sunday. The commander in the town Tal Abyad, who is known as Abu Musaab, was captured amid intense fighting between the Islamic State in Iraq and the Levant and Kurdish militants late Saturday, the Britain-based Syrian Observatory for Human Rights said. The Islamic fighters retaliated by rounding up civilians believed to be relatives of the Kurdish fighters to hold as bargaining chips. Infighting between al-Qaida militants and more mainstream Syrian rebels, as well as between Kurds and Arabs, has grown more common in Syria in recent weeks - part of a power struggle that is undermining their efforts to topple President Bashar Assad. Kurdish gunmen have been fighting to expel al-Qaida militants - many of who are foreign fighters - from the northeastern province of Hassakeh over the past week. More than 60 fighters were killed from both sides, according to activists. On Saturday evening, the fighting spread to Tal Abyad, near the Turkish border. The inter-rebel clashes, along with the efforts by extremist foreign fighters to impose their strict interpretation of Islam in areas they control, are chipping away at the opposition's popularity at a time when the regime is making significant advances on the ground. In recent weeks, Assad's troops have seized the momentum in the civil war, now in its third year. His forces have been on offensive against rebels on several fronts, including the north. Rami Abdul-Rahman, director of the Observatory, said Abu Musaab was seized by Kurdish fighters late Saturday during clashes between the two sides. That prompted the al-Qaida militants to arrest hundreds of Kurdish residents in retaliation. He said Kurdish rebels freed Abu Musaab Sunday following mediation for a cease-fire and an agreement that the militants would release 300 civilian Kurds in exchange. The fighting subsided Sunday. Kurds, the largest ethnic minority in Syria, make up more than 10 percent of the country's 23 million people. Their loyalties in the conflict are split between the two sides. Most Kurds live in the poor northeastern regions of Hassakeh and Qamishli, wedged in between the borders of Turkey and Iraq. More than 93,000 people have been killed since the Syria uprising started in March 2011, according to the United Nations. It escalated into a civil war after opposition supporters took up arms to fight a brutal government crackdown. Also Sunday, Syrian state television claimed that a pro-government group hacked into two social messaging networks and seized records of local users. That could expose Syrian rebels and other activists who depend on the networks to publicize army crackdowns on their hometowns and communicate with each other. Many telephone landlines and cellphones in Syria are assumed to be tapped. The TV said the social networking site Tango was hacked on Sunday by the Syrian Electronic Army. The Syrian Electronic Army is a shadowy group that supports Assad's regime. There was no immediate comment from Tango. Syrian media said another network - Truecaller - also was hacked last week. A spokesman for the company, Kim Fai Kok, confirmed that Truecaller's website had been hacked, but the hackers only got ahold of so-called tokens that don't contain any information that can identify users. For the token to be of use, hackers also need a security key, which they didn't obtain, Fai Kok said. Fai Kok said the company has been able to trace the hacker attack to Syria and has now taken extra measures to improve the security of its services. Associated Press writer Malin Rising in Stockholm, Sweden, contributed to this report.