Image copyright Reuters Image caption Farook and Malik were photographed arriving in Chicago from Saudi Arabia in 2014

The couple behind the San Bernardino attack that killed 14 people were radicalised before they started dating, the director of the FBI has said.

James Comey said Tashfeen Malik and husband Syed Farook spoke of jihad and martyrdom during conversations on an online dating service in late 2013.

The FBI believes the duo were inspired by foreign terrorist organisations, but said the investigation is ongoing.

Last week's massacre was the deadliest terrorist attack in the US since 9/11.

The couple were both killed in a shoot-out with police hours after the attack.

Speaking during a Senate hearing in Washington, Mr Comey characterised the couple as "homegrown violent extremists", and said that precise nature of the foreign influence is still under investigation.

Image copyright Reuters Image caption Mr Comey made the revelations during testimony on Capitol Hill

Earlier this week, another FBI official said that there was no evidence uncovered so far to suggest the attack was plotted overseas.

Mr Comey said the investigation "indicates that they were actually radicalised before they started courting or dating each other online, and noted discussions they had about jihad before their engagement last year. Malik moved to the US in July 2014 on a visa designed for fiances, and married Farook - a US national - a month later.

The BBC's Jane O'Brien in Washington says the revelation is significant, as it contradicts earlier suggestions that Malik may have radicalised her husband.

Image caption Fourteen people were killed in the San Bernardino attack

Meanwhile, the investigation has broadened to examine anybody who may have been "involved with assisting them, with supporting them, with equipping them," the director said.

Over the weekend, police raided the home of Enrique Marquez, a long-time friend and distant relative of Farook who purchased the two large weapons used during the rampage.

Mr Marquez is being questioned by federal investigators. Media reports say that authorities had trouble finding him after the attack, but later found that he had checked into a mental health facility.

Mr Comey was also chided for not securing the couple's home, which allowed journalists to enter and produce reports from inside. The ethics of that reporting was widely debated.