Islamic state cloudflare Anonymous Ghostsec
Islamic militants have claimed responsibility for the attack on the South Korean embassay in Tripoli. (Jihad-e-informacion)

Gunmen attacked South Korea's embassy in the Libyan capital of Tripoli on Sunday, killing two Libyan guards, according to Seoul's foreign ministry.

Armed militants claiming loyalty to Islamic State (Isis) claimed responsibility according to a statement on social media. The authenticity of the report has not yet been verified.

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

The attackers fired dozens of rounds from a car at the embassy compound, killing two security officers who were Libyan government employees. Another was wounded, said Essam Naas, a Tripoli security spokesman.

There are reports that Jamal Jibril, 65, half-brother of former Libyan prime minister Dr Mahmoud Jibril, was killed during the attack, according to a security source who spoke to Arabic newspaper Al-Wasat.

Three South Koreans working in the embassy, including two diplomats were unhurt, said a ministry official.

"There are no reported casualties of South Korean nationals," the official told Yonhap news agency.

Libyan militants pledging loyalty to IS have claimed responsibility on several attacks on foreigners in Libya, including an assault on the Corinthia Hotel in Tripoli and the beheading of 21 Egyptian Christians.

"We do not know whether the attack targeted the embassy or the Libyan (security) officers," an official told AFP, adding the South Korean ministry was considering evacuating all its staffers from the country.

Embassies attacked

The attack comes a day after 10 people were killed in the eastern Libyan city of Benghazi in fighting between army forces and Islamist groups, according to a report in Egyptian news portal Al Bawaba.

A tank battalion and armed youths fought with forces belonging to the Majlis al-Shura, a collection of armed groups including Islamist militants, in a southern district on Friday 10 April, army officials said.

IS has also carried out attacks on embassies in Tripoli, including Egypt, the United Arab Emirates and Russia. Most countries have now removed their diplomatic staff for fear of violent reprisals.