NEW DELHI -- Four Indian nationals have been detained near the Libyan city of Sirte, India's foreign ministry said Friday, but declined to say who had held the men.

Foreign Ministry spokesman Vikas Swarup told reporters that the four men were held at a checkpoint about 50 kilometres from Sirte late Thursday night. The area is under the control of Islamic State militants.

Three of the men had been teaching at the university in Sirte. The fourth worked in nearby Jufra, Swarup said.

He said that India's mission in Tripoli was in touch with officials in Libya to ensure the safe return of the men.

"We are in regular touch with the families concerned and all efforts are being made to ensure the well-being and early release of the four Indian nationals," Swarup said.

Libya is bitterly divided between an elected parliament and government based in the eastern city of Tobruk, with little power on the ground, and an Islamist militia-backed government in the capital, Tripoli. Hundreds of militias are aligned with either side or battling on their own for power and turf.

Last year India secured the return of 46 nurses from war-ravaged Tikrit, Iraq that was under the control of the Islamic State.

Another 39 construction workers are believed to be held captive by IS in Mosul for over a year despite attempts by Indian authorities to secure their release.