Official: 30 killed in fight for key Libyan city