BENGHAZI, Libya (Reuters) - A blast hit worshippers leaving a mosque in the east Libyan city of Benghazi on Friday, apparently targeting a key tribal ally of eastern based commander Khalifa Haftar for a second time, security and medical officials said.

The explosion wounded at least seven people, a medical official said, but left the tribal leader, Saleh al-Ateiwish, unharmed. It was unclear who carried out the attack.

Since the uprising that toppled and killed former Libyan leader Muammar Gaddafi six years ago, the country has fractured into a complex network of rival factions that have fought for power, aligning themselves with competing governments.

Haftar is aligned with a government and parliament in eastern Libya that have rejected a U.N.-backed government in the capital, Tripoli.

One of those injured in Friday’s blast told Reuters that an explosive device had been left next to worshippers’ shoes at the entrance to the mosque. He said two of Ateiwish’s children were among the wounded.

Ateiwish, head of the Magharba tribe, was wounded as he left the same mosque in Benghazi’s Sidi Frej district in November last year, two months after Haftar’s forces secured control of several key oil terminals with Magharba support.

Haftar declared victory a month ago in a three-year military campaign to take control of Benghazi from Islamists and other opponents, though there are still pockets of resistance in one central Benghazi district.