Two weeks ago, France's top spy arrived in Washington for urgent meetings with his counterparts at the CIA and other agencies on the war in Syria and the rapidly morphing terror threat emanating from Isis (Islamic State).
"We have now two kinds of threats," Bernard Bajolet, the head of the French spy service, said in a rare public appearance during his visit. There is an "inside threat", he said, speaking of young radicalised French residents, but "in addition to that we have the threat from outside, either through terrorist actions which are planned [and] ordered from outside or only through fighters coming back to our countries".
The attacks on Saturday in Paris showed how these twin threats are converging on France like a vice, putting extraordinary pressure on security services that have long been regarded as among the most capable in Europe, but now seem overwhelmed by a surge in plots tied to Islamist terror groups.
French and US intelligence services were scrambling to make sense of the still-emerging details about an attack that involved at least seven militants launching assaults on targets scattered across the French capital, leaving at least 132 people dead.
But a flurry of related arrests outside France, and clues suggesting that at least one of the gunmen recently entered Europe through Greece, seemed to bolster French President Francois Hollande's description of the attack as one that was "prepared, organised and planned from outside the country by [Isis], but with help from inside". If so, the attack appears to have been a hybrid of the threat streams cited by the French spy chief last month, as well as an evolution of the objectives and tactics employed by Isis.
"They're exploiting a seam in France," said a senior US official with access to classified information about the attacks and Isis. "This could be Isis inspired" or involve "trained fighters from Isis coming back to France. I'm not sure it makes much of a difference. Isis feeds on this chaos."
Since it split off from al-Qaeda three years ago, Isis has focused most of its energy and resources on establishing and expanding its so-called caliphate in Iraq and Syria. The group's preoccupation with controlling territory seemed to set it on a different path to al-Qaeda and its overriding aim of mounting often sophisticated terror attacks against Western targets.
But in a span of weeks, Isis has been tied to plots with al-Qaeda-style signatures of sophistication and spectacle. The group claimed credit for the downing of a Russian airliner in Egypt last month, although authorities have yet to conclude definitively that the crash that killed all 224 passengers was caused by a bomb.
Earlier this year, Isis loyalists began attacking soft targets outside the borders of the "caliphate". They included a museum and a beach resort popular with Western tourists in Tunisia and worshippers at Shia mosques in Kuwait, Yemen and Saudi Arabia. In Cairo, an Isis cell claimed responsibility for a car bomb attack on an Italian consulate.
Isis promptly claimed credit for the Paris assaults, saying France and other US allies involved in the campaign of air strikes in Iraq and Syria would "continue to be at the top of the target list for the Islamic State" and that "the scent of death will not leave their nostrils as long as they partake in the crusader campaign".
US officials said they had seen no evidence so far that the plot in Paris was being directed from abroad while it unfolded. "That would be something you would hope that [French and US spy services] would be seeing and intercepting," the US official said.
Threats against the West have been part of Isis' playbook since its inception as a rival to al-Qaeda. But officials and experts said it may be more focused on fulfilling those threats now, in part because its momentum in Iraq and Syria has stalled.
The mayhem in Paris also moves Isis back to the centre of global headlines, providing attention and a perception of momentum that the terror group thrives on to attract support and recruits.
The attack comes as the perceived vulnerabilities of the US and its allies against Isis may be diverging. Overall, about 250 Americans have travelled to Iraq and Syria, or tried to. FBI Director James Comey recently said that though the bureau remained deeply concerned about "lone wolf" attacks inspired by Isis, the number of Americans seeking to travel to the Middle East to join the group had tapered off.
The flow of Islamist militants with European passports, by contrast, shows no signs of slowing. Bajolet, the head of the Directorate-General for External Security, said last month that at least 500 French citizens were believed to be fighting in Syria and Iraq, although the total number who had travelled there and perished or returned may be triple that.
"During the last month we have disrupted a certain number of attacks in our territory," Bajolet said. "But this doesn't mean that we will be able all the time to disrupt such attacks."
France has steadily built some of the most robust and aggressive counter-terrorism defences of any European country over the past two decades, a project that dates to 1995, when Algerian Islamic extremists carried out bombings on the Paris subway system. France has experienced a surge in jihadist terrorist plots over the past two years, with authorities making arrests or responding to attacks in at least 16 different cases.
French authorities have repeatedly warned that they are struggling to cope with a metastasised threat from a variety of actors. With the exception of Saturday's suicide bombings and January's well-orchestrated, simultaneous attack on the offices of Charlie Hebdo and other sites, most of the incidents were allegedly planned by lone individuals who either drew inspiration or indirect guidance from Isis. Almost all had lived in France for years. Many had either travelled to conflict zones in the Middle East, or had tried to do so.
Late last month, French authorities arrested a 25-year-old man, Hakim Marnissi, on suspicion of planning to attack French Navy personnel at a base in Toulon.
The Interior Ministry said Marnissi had been under surveillance for some time and police intervened after he had received a combat knife and a mask in the mail.
Although the plot was thought to be in its embryonic stages, officials said Marnissi had tried twice - unsuccessfully - to travel to Syria and had been in touch with a French member of Isis there.
In a similar case, French police arrested a 29-year-old Paris man on August 15 after he had made a circuitous return to France from Raqqa, Syria - the capital of Isis' caliphate. French officials said the man admitted under questioning that he had received rudimentary military training in Syria and was urged to carry out some kind of attack back home, possibly on a concert hall.
That same month, authorities failed to detect another so-called lone wolf, Ayoub el Khazzani, a heavily armed gunman whose attack on a high-speed train from Amsterdam to Paris was thwarted largely by the actions of three American tourists. Khazzani is a native of Morocco who had grown up in Spain but recently moved to France. French officials said Khazzani was inspired by radical Islam and had travelled to Turkey, but whether he had direct connections to any militant groups remains unclear.