A car bomb targeting security forces on Tuesday in the eastern Libyan city of Benghazi killed 22 people and wounded 20, a spokesman for the forces and medical officials said.
The blast occurred in a residential area in the Guwarsha district, the scene of fighting between security forces loyal to Libya's eastern government and an alliance of militants and other opponents.
The alliance, the Shura Council of Benghazi Revolutionaries, claimed responsibility for the blast, according to a statement posted on media sites linked to the group.
Benghazi has been plagued by violence since eastern commander Khalifa Haftar launched a campaign against the Shura Council two years ago.
His forces have advanced in several areas in recent months, but have not gained full control of the city.
There have been occasional car bombings, though the toll from Tuesday's blast was unusually high.
The attack targeted a gathering of the special forces unit of Haftar's forces, known as the Libyan National Army (LNA), forces spokesman Fadel al-Hassi said. A Reuters witness said the powerful explosion reduced a three-story building to rubble.
Haftar's forces are allied to a government that has been based in eastern Libya since 2014, when armed groups set up a rival administration in the capital, Tripoli.
A U.N.-backed government moved into Tripoli earlier this year, but Haftar and the eastern government have so far rejected it.