Syrian refugees brave the cold and snow as they walk to a metro station in Istanbul February 11, 2015, at the start of a day's begging. REUTERS/Murad Sezer

ISTANBUL (Reuters) - Turkish security forces detained 13 foreigners and a Turk seeking to cross the border into Syria to join Islamic State militants, Ankara's military said on Wednesday.

Turkey has been accused in the past of being lax in controlling the border, which is used as a transit point by foreign fighters joining the civil war in neighbouring Syria.

The 14 suspects were caught on Monday afternoon in Oguzeli, south of the major city of Gaziantep in southeast Turkey, according to a statement on the website of the General Staff, or military headquarters.

After questioning, it said, the foreigners were handed over to police to be deported while the Turk was released on the orders of a state prosecutor.

Prime Minister Ahmet Davutoglu told Reuters in an interview last month that Turkey would do everything it could to stem the flow of foreign fighters, describing the Syrian conflict as a major national security threat.

Turkish authorities have banned some 8,000 foreigners from entering the country over the past year alone because of security concerns, and had further improved coordination with European intelligence agencies, he said.

(Writing by Daren Butler; Editing by Mark Heinrich)