The two men were among 198 migrants to land on the Greek island of Leros that day in October.

On a crisp morning last October, 198 migrants arrived on the Greek island of Leros, all of them seemingly desperate people seeking sanctuary in Europe. But hiding among them were four men with a very different agenda.

The four were posing as war-weary Syrians - all carrying doctored passports with false identities. And they were on a deadly mission for the Islamic State.

Two of the four would masquerade as migrants all the way to Paris. There, at 9:20 pm on November 13, they would detonate suicide vests near the Stade de France sports complex, fulfilling their part in the worst attack on French soil since World War II.

FOTIS PLEGAS G/REUTERS Authorities believe that when they landed, the two men already planned to die in Paris.

The other two men would not make it that far.

READ MORE

* French jets attack IS stronghold

* NZ woman hid while shots rang out

* 'We are at war', France says

* 'I held him in my arms and he died'

* Survivor dangled from window

MURAD SEZER/REUTERS When the Iraqi men arrived on Leros, they told authorities they were Syrian and were not questioned.

Stopped upon arrival in Greece for lying about their identities, they were delayed - but only for a few weeks before being granted permission to continue their journey deeper into Europe. Their story - including key details never before disclosed - offers a cautionary tale for a continent suddenly facing its worst security threat since the end of the Cold War. The mens' journey from the battlefields of Syria was reconstructed through interviews with intelligence officials and from French investigative documents, as well as an interview with an Islamic State commander.

GETTY IMAGES Spectators gather on the pitch after news of the bombing and terrorist attacks in Paris reaches the fans.

European security officials say they believe that the Islamic State has seeded terror cells on the continent over the past year and was able to do so in part because the European Union failed to come to grips with a migrant crisis that opened a funnel for the militant group.

Europe is now working with Turkey to bar its doors, ending the waves of irregular migration that washed over the continent last year. But more than a million migrants - a record - have already entered. Hundreds of thousands of them, European intelligence agencies say, may have done so without thorough checks at their entry point: Greece.

The vast majority of migrants were genuinely fleeing war and poverty. But, over the past six months, more than three dozen suspected militants who impersonated migrants have been arrested or died while planning or carrying out acts of terror. They include at least seven directly tied to the bloody attacks in Paris and Brussels.

CHUNG SUNG-JUN/GETTY IMAGES At least 128 people were killed in attacks on Paris, and vigils were held around the world including at the French Embassy in Seoul.

The Islamic State is gloating that they have far more lying in wait.

"We have sent many operatives to Europe with the refugees," an Islamic State commander said in an interview over an encrypted data service. "Some of our brothers have fulfilled their mission, but others are still waiting to be activated."

The accounts of the two men who landed in Leros with plans to die in France, only to stop short of their goal, expose the weaknesses in a haphazard system that has created risks of unknown dimensions.

1 of 20 GONZALO FUENTES / REUTERS A forensic expert inspects the apartment raided by French Police special forces. 2 of 20 CHRISTIAN HARTMANN / REUTERS Members of French special police forces ans a forensic expert near the scene of the raid. 3 of 20 JACKY NAEGELEN / REUTERS French police enter the Eglise Neuve church as they secure the area. 4 of 20 REUTERS French police are seen during an operation in Saint-Denis, near Paris, to catch fugitives from deadly attacks in the French capital. 5 of 20 CHRISTIAN HARTMANN/REUTERS French riot police (CRS) are seen in Saint-Denis, France, near Paris. 6 of 20 JACKY NAEGELEN/REUTERS French soldiers secure the area as shots are exchanged in Saint-Denis, France, near Paris, during an operation to catch fugitives from deadly attacks in the French capital. 7 of 20 CHRISTIAN HARTMANN/REUTERS French special police forces secure the area as shots are exchanged in Saint-Denis, France. 8 of 20 JACKY NAEGELEN/REUTERS A French soldier checks the identity papers of a man in the area where shots were exchanged in Saint-Denis. 9 of 20 JACKY NAEGELEN/REUTERS Journalists gather at the scene of a raid targeting the alleged mastermind of attacks in Paris. 10 of 20 CHRISTIAN HARTMANN/REUTERS French soldiers secure the area after shots were exchanged in Saint-Denis, France. 11 of 20 BENOIT TESSIER/REUTERS French police evacuate residents in Saint-Denis, France, near Paris, during an operation to catch fugitives from deadly attacks in the French capital. 12 of 20 CHRISTIAN HARTMANN/REUTERS French special police forces secure the area as shots are exchanged in Saint-Denis. 13 of 20 BENOIT TESSIER/REUTERS French police secure the area as shots are exchanged in Saint-Denis. 14 of 20 CHRISTIAN HARTMANN/REUTERS French special police forces secure the area as shots are exchanged in Saint-Denis, France, near Paris, during an operation to catch fugitives from deadly attacks in the French capital. 15 of 20 REUTERS French special police forces secure the area. 16 of 20 CHRISTIAN HARTMANN/REUTERS French special police forces secure the area as shots are exchanged in Saint-Denis. 17 of 20 Christian Hartmann/Reuters French special police forces are seen during the raid. 18 of 20 CHRISTIAN HARTMANN French special police forces secure the area. 19 of 20 Christian Hartmann/Reuters French special police forces secure the area as shots are exchanged during an operation to catch fugitives from deadly attacks in the French capital. 20 of 20 CHRISTIAN HARTMANN/REUTERS French special police forces secure the area as shots are exchanged in Saint-Denis.

"The Greeks failed in protecting the borders into the EU," said a senior European intelligence official who, along with 11 other senior European, US and Arab officials interviewed for this story, spoke on the condition of anonymity in order to discuss classified information.

He added, "And we all failed by not pushing hard enough to establish that security."

In early September, just a few weeks before the four men landed on Leros, they were invited to attend a secret meeting in a central Syrian city controlled by the Islamic State.

1 of 19 STEFAN WERMUTH / Reuters A woman holds a placard that reads, "I am Charlie", during a vigil at Trafalgar Square in London. 2 of 19 Reuters The words Paris Est Charlie 'Paris is Charlie' are projected onto the Arc de Triomphe on January 9, 2015 in Paris, France. 3 of 19 Reuters Gunmen shoot a wounded police officer on the ground at point-blank range after fleeing the offices of Charlie Hebdo in Paris, in this image taken from amateur video. 4 of 19 REUTERS A woman with "Not scared" written on her hands as she attends a vigil to pay tribute to the victims of the Paris shooting. 5 of 19 Hundreds gathered in Paris in the hours after the attack to remember the dead. 6 of 19 Vigils were held all over Europe for the victim, this one in London where people raised pens to honour the journalists. 7 of 19 Reuters Firefighters carry a victim on a stretcher at the scene after masked gunmen stormed the offices of Charlie Hebdo, a satirical newspaper, killing 12 people. 8 of 19 Philippe Wojazer French policemen stand next to funeral hearse in front of the entrance of the Paris offices of Charlie Hebdo after the shooting, which killed 12 people. 9 of 19 Reuters Gunmen shoot a police officer dead outside the offices of French satirical newspaper Charlie Hebdo in Paris, in this still image taken from amateur video. 10 of 19 Christian Hartmann Police investigators examine the impacts from machine gun fire on the front of a police vehicle in the street near the Paris offices of Charlie Hebdo, a satirical newspaper, where masked gunmen killed 12 people. 11 of 19 Policemen look at a bullet impact on a car after Paris terror attack. 12 of 19 Christian Hartmann Police and emergency services are seen near the scene of the Paris terror attack. 13 of 19 Footage from the rooftops of the terror attacks in Paris 14 of 19 Youssef Boudlal A woman holds a placard that reads "Hand in hand against barbarity," during a vigil to pay tribute to the victims of the Paris terror attack. 15 of 19 Youssef Boudlal A man holds a placard that reads, "I prefer to die standing than live on my knees," during a vigil to pay tribute to the victims of the Paris terror attack. 16 of 19 Youssef Boudlal A woman holds a placard in Paris at Republique square during a vigil to pay tribute to the victims of the shooting at the offices of satirical magazine Charlie Hebdo. 17 of 19 Gonzalo Fuentes A person holds a placard which reads "I am Charlie" to pay tribute during a gathering at the Place de la Republique in Paris, following a shooting by gunmen at the offices of weekly satirical magazine Charlie Hebdo. 18 of 19 A woman with a bouquet of roses is surrounded by journalists as she arrives at the scene after a shooting at the Paris offices of Charlie Hebdo. 19 of 19 Francois Lenoir A placard which reads "I am Charlie" is pictured as people gather in front of the European Parliament in Brussels to pay tribute to the victims of the shooting at satirical magazine Charlie Hebdo in Paris.

Two of them - the ones who would blow themselves up outside the Stade de France - were later glorified in an Islamic State video as unnamed militants from Iraq. The other two men, both round-faced and lightly bearded, were Mohamed Usman, a Pakistani who claims to be 23 years old, and Adel Haddadi, a 28-year-old Algerian.

Usman and Haddadi had joined the Islamic State in 2014, the men would tell European investigators. In Syria, they received extensive training with automatic weapons, but neither was a stranger to extremism.

Haddadi had previously been on the watch lists of Algerian intelligence for his activities; Usman was suspected of links to Lashkar-e-Taiba, a radical Pakistani terror group tied to the 2008 siege of Mumbai, according to two senior European security officials.

That September meeting in Syria would prove fateful to their futures. In the living room of a home, according to their accounts, a senior Islamic State official told them that the time had come to leave the Caliphate.

"You are on a mission to go to France, to kill, to become a martyr," an Islamic State commander told them, according to their testimony, which was cited by a European security official.

The men, in interviews with European investigators, would later recall an intense sense of pride at being picked for such a mission.

"They were happy and honoured that they were chosen to die for the cause and for Allah," said the European security official. "They were told that they would go to paradise."

To get as far as Leros, the four men were spirited out of Syria and into Turkey, where they made their way to the coast. From there, they told investigators, they took a smuggler's raft laden with migrants. The vast majority of asylum seekers departing from Turkey were arriving on Greek islands - some of which lie a brief 30-minute boat ride away. The numbers of arrivals were so large, in the thousands per day, that Greece - a nation brought to its knees by recession and EU-imposed budget cuts - could not handle the caseloads.

Frontex, the EU's border agency, provided some preliminary vetting. But managing the masses was largely left to the overwhelmed Greek Coast Guard and to local island police, who were more used to chasing pickpockets than screening for possible terrorists.

Many of the new arrivals - particularly Syrians fleeing war - had no passports or legal travel documents at all. Yet European intelligence agencies and security analysts now estimate that up until the Paris attacks in November, only about 20 percent of the new arrivals were being thoroughly questioned and checked.

"The fact that only about 20 percent of those who entered Greece were fully processed allowed for a lot of cracks in the system," said Ioannis Michaletos, an Athens-based security analyst. "This increased security risks in Greece, but also for the rest of Europe."

In an interview, Zacharoula Tsirigoti, lieutenant general of the Greek police, conceded her forces were overwhelmed. Greece, she said, had pleaded with the EU for more help, but until the Paris attacks, that assistance - including requests for more staff and machines to enter migrants' information into a regional database known as Eurodac - was not forthcoming.

"We had been asking for support knowing we needed more specialised personnel in the islands and more Eurodac machines," she said. "But we received very little. Everyone knew we were facing huge financial problems. So for months we had to make due with what we had, hoping help would arrive."

BLENDING IN

On the morning of October 3, the four terrorists tried to blend in with the migrants who had come ashore that day. According to a manifest, they were among at least 47 asylum seekers who said they were Syrians fleeing war. But there was also a dizzying array of other nationalities, including Somalis, Yemenis, Afghans and Palestinians.

When their turn came, the two Iraqi militants showed authorities doctored Syrian passports, according to the classified French files. Remains of the documents found near their bodies at the Stade de France suggested they had come from a cache of more than 3800 passports - all authentic - seized by the Islamic State after its major advances in Syria in 2013.

While the passports had been tampered with to insert new photographs, they otherwise appeared real to the eye and touch. The men's claims of being Syrian asylum seekers were not seriously questioned by Frontex or the Greeks. Along with dozens of other migrants who landed that day, they were not detained and merely told to leave Greece within six months.

Classified records show the Iraqis who claimed to be Syrian - and who still have not been identified - then quickly travelled over land to Serbia, where they registered at a refugee camp in Presevo on October 7. By November, they had linked up with the other assailants involved in the Paris attacks.

On November 13, they became the only non-European born attackers to take part in a series of assaults that saw nine men kill 130 people at different locations in Paris. But that day, what was nine assailants might have been 11, possibly leading to even more victims but for the grace of a few extra questions in Leros.

Like the two Iraqis, Usman and Haddadi also produced falsified Syrian documents that senior European intelligence officials now think came from the same Islamic State stash of seized passports. But when questioned by Frontex, the two men, unlike the Iraqis, crumbled.

Usman, a Pakistani, did not speak Arabic well - quickly betraying his claim to be Syrian. Haddadi knew almost nothing about the city he said was his birthplace - Aleppo, Syria.

Under EU guidelines, the most the European border agency could do was pass them on to the Greeks. So that's what they did, and the local authorities promptly lumped them in with a then-surging backlog of economic migrants who were using fake documents to enter the asylum system.

Both men were transferred to the larger Greek island of Kos, where they were given lightening legal judgments. In what became a customary practice in Greece, Usman and Haddadi received suspended three-month sentences along with an order to leave the country within a month. It didn't matter how or which way they went.

After gaining their freedom on October 28, Haddadi, the more senior of the two, quickly sent a text via the messaging app WhatsApp to their Islamic State handler in Syria.

"We need money," it simply said, according to intelligence officials with access to the pair's phone records.

That money soon arrived via the same method often used by migrants - a wire from Turkey to Greece. Now flush with cash, the two men continued their journey.

They were only 25 days behind their Islamic State comrades travelling to Paris.

The men, taking a path frequently traversed by migrants, embarked on a trek through the western Balkans.

They knew their destination was France, but the men said they had not been given precise instructions on when or where the attacks would unfold. They also were unaware of the identities of the other Paris attackers besides the two Iraqi militants they had travelled with. They were to get further instructions along the way.

The Islamic State commander said that was the way the group was seeking to operate.

"The cells don't necessarily know one another; that's to protect other operatives," he said. "So even if one or two get arrested, they won't be able to lead to other operatives, because they don't know them. We are not finished yet with Europe, since they didn't seem to have understood our warnings."

But their delay in Greece had a major side effect that may very well have saved lives: As the nine attackers were fanning out across Paris on the evening of November 13, Usman and Haddadi were still on the road. After passing through Macedonia, Serbia, Croatia and Slovenia, they arrived in the shadow of the Alps: Austria

And they had received fresh orders to stay put.

The men entered Austria without passports and offering fake names, while this time claiming to be from their real countries, Pakistan and Algeria. On December 4, both men applied for asylum in Austria, and then took up residence in a teeming refugee centre - a converted truck storage depot - about 1.5km from the German border.

Their phone records show that they had begun reaching out to contacts all over Europe, a list that, investigators say, included other newly arrived migrants as well as longer-term immigrants tied to the region's criminal underworld.

European authorities had immediately launched a massive investigation following the Paris attacks, and were beginning to retrace the attackers' steps. After finding a Syrian passport at the Stade de France, investigators ran fingerprints and discovered that two of the dead men had arrived in Greece as Syrian migrants on October 3. With the aid of German and US intelligence, a manifest of the day's migrant arrivals - including photos - was run through databases and a face-recognition system of known radicals and Islamic State militants, according to a senior European intelligence official.

The searches returned two hits - men also claiming to be Syrian who had arrived that day.

On December 10, Austrian police in Salzburg received their photos and fake Syrian names from French intelligence. Within four hours, they had tracked them down to the refugee centre on Munchener Street. A SWAT team moved in, arresting the two men in their room. As they were taken into custody, Haddadi attempted to pass his cellphone's SIM card to another migrant, who was later arrested.

During 150 hours of interrogation, both men would tell their stories. They are now being held at an undisclosed jail in Austria, and based on their testimony investigators are pursuing various leads that have already led to the arrest of two more migrants in the same Salzburg camp where the men were living. Officials expect that the two men will ultimately be extradited to France to stand trial in connection with the Paris attacks.

"They are sad because they are still alive, because they feel they should have been martyrs," said a European security official. "They are sad they did not die with the others in France."

*comments are closed