(Changes identifying slug, adds background)

MADRID, Aug 25 (Reuters) - Spain and Morocco arrested 14 people on Tuesday suspected of recruiting fighters to join Islamic State in Syria and Iraq, Spain's Interior Ministry said.

Suspects were detained in the outskirts of Madrid and in other cities and towns in Morocco, it added.

The arrests were linked to "a network ... capturing and sending foreign fighters to join the ranks of the terrorist organisation Daesh (Islamic State) in the Syrian-Iraq region that it controls," the ministry statement said.

The operation comes days after a 26-year-old Moroccan man was accused of attacking passengers on a train in France, armed with a Kalashnikov, an assault rifle and a box cutter knife.

Spain and other countries in Europe and north Africa have said they are alarmed about the risk of locals joining militants abroad and returning to launch attacks at home.

(Reporting By Sarah Morris; Editing by Sonya Dowsett, Andrew Heavens) ((sarah.morris@thomsonreuters.com; 0034 91 585 8530 x8328;))

Keywords: MIDEAST CRISIS/SPAIN MOROCCO