TRIPOLI (Reuters) - Islamic State militants killed three soldiers loyal to Libya's self-declared government controlling Tripoli, state news agency LANA said on Sunday.

Islamic State forces have profited from Libya's turmoil, four years after the overthrow of Muammar Gaddafi, to gain a foothold in the North African country where two rival governments are battling for power and Libya's oil wealth.

The militants stormed a military police checkpoint in Bughrain, a town east of Misrata, and killed the soldiers with knives, Tripoli-based LANA reported.

Islamic State militants have in recent months claimed responsibility for several attacks, including the storming of a Tripoli hotel and the murder of dozens of Egyptian and Ethiopian Christians.

They have seized the central city of Sirte after clashing repeatedly with forces from the western city of Misrata sent from Tripoli. The militants have staged suicide bombings against Misrata forces at checkpoints on the Sirte to Misrata road.

Libya's internationally recognized government and elected parliament have been based in the east since a rival faction seized the capital in August and reinstated a previous assembly.

Islamic State has also built up a presence in Derna in the east and in the main eastern city of Benghazi.

(Reporting by Ahmed Elumami and Ulf Laessing; Editing by Janet Lawrence)