At least 38 people, mostly soldiers, were killed in 24 hours of fierce fighting between the Libyan army and Islamists in the eastern city of Benghazi, officials said Sunday.