Embassy guards killed Libya
This file photo shows Libyan police officers set up checkpoints in the Libyan capital Tripoli on January 25, 2015 as clashes continue in the west and east of the country. MAHMUD TURKIA/AFP/Getty Images

SEOUL (Reuters) - Unidentified gunmen fired shots at the South Korean embassy in Tripoli on Sunday killing two local security guards, a South Korean official in Seoul said.

The gunmen fired from a car at the embassy compound, killing two security officers who were Libyan government employees and wounding another, the South Korean foreign ministry official said, asking not to be identified.

The official said the embassy is staffed by two foreign service officials and one administrative staff member.

There was no confirmation of the identity of the gunmen, the official said. China's Xinhua news agency quoted a Libyan security official as saying the gunmen were affiliated with Islamic State in Iraq and Syria.

Libyan militants professing loyalty to Islamic State in Iraq and Syria have been blamed for several high-profile attacks this year involving foreigners, including an assault on a luxury Tripoli hotel and the beheading of 21 Egyptian Christians.

Libya is caught up in a conflict between two rival governments and armed forces who have attacked towns allied with opponents. But Islamist militants are also increasing their reach in the chaos since Muammar Gaddafi's fall in 2011.

The South Korean foreign ministry official said the government was considering relocating the embassy, without elaborating.

(Reporting by Jack Kim and Ju-min Park; editing by Simon Cameron-Moore and Jason Neely)