BERLIN (Reuters) - Germany plans security investigations of all military recruits from July 2017 after its military counter-espionage service (MAD) identified 20 Islamists in the country’s armed forces, German media group Funke reported on Saturday.

Young men line-up after their arrival at the Bundeswehr barracks 'Donnerberg' in Eschweiler near the western German city of Aachen January 3, 2011. REUTERS/Wolfgang Rattay

A spokesman for the agency confirmed the figure, adding that 60 additional potential cases were under investigation.

Draft legislation to be considered by the German parliament in the coming weeks would mandate investigations of all recruits to counter efforts by Islamic State to infiltrate the military and get weapons training, Funke Mediengruppe reported.

A German Defence Ministry spokesman said existing law required investigations of soldiers after they were recruited. Before that, recruits had to provide police records and agree to unlimited access to their records in the federal register.

Recruiting offices had received an undisclosed number of queries from people who wanted to join the military for only a few months and expressed a keen interest in intensive weapons and equipment training, the MAD spokesman said.

In a statement provided to the Funke media group, the agency said it was concerned about a July 2014 internet posting by Islamic State in which the group urged those with military training to join its ranks, and other calls for supporters to learn to shoot and to become familiar with weapons.

German security services are on high alert after two Islamist militant attacks this summer.

Almost 900,000 migrants arrived in Germany last year and while many Germans initially welcomed them, security concerns have since increased.

Last week, German police arrested a Syrian man in Berlin on suspicion of being a member of a foreign terrorist organization.

In October, another Syrian refugee was arrested on suspicion of planning a major attack in Berlin after police discovered explosives in his apartment.