The FBI has launched a terrorism investigation after an alleged extremist attempted to behead a man and stabbed a woman outside in Virginia in a possible ISIS-inspired attack.

The incident happened outside an apartment complex on Saturday night in what police in Roanoke are describing as a 'random attack'.

Witnesses said the suspect, identified as 20-year-old Wasil Rafat Farooqui, shouted 'Allah Akbar', meaning 'God is the greatest', while attempting to decapitate the male victim, who was able to fight off the armed assailant.

The suspect had previously tried to sneak into Syria for terrorist training.

Wasil Rafat Farooqui, pictured above in booking photos, was arrested on Saturday evening after a man and a women were attacked in Roanoke, Virginia

Police arrested Farooqui, a US-born citizen, when he walked into the same hospital as the two victims to seek medical treatment for his own injuries.

The suspect has been charged with two counts of malicious wounding causing permanent impairment according to jail records. He is being held without bond at the Western Virginia Regional Jail.

According to jail records, the man and woman suffered 'permanent impairment'.

According to ABC News, Farooqui had previously traveled to Turkey with the aim of sneaking over the border into Syria and joining ISIS.

A US intelligence source tells CBS News that Farooqui, who is believed to be self-radicalized, only got as far as Europe in his travels and returned home earlier this year.

It was that aborted trip to Syria that made the FBI take notice of Farooqui in the first place, according to the source.

Saturday's attack happened around 8pm at The Pines apartments in the 4300 block of Banbury Lane.

The FBI has launched a terrorism investigation following Saturday's incident at The Pines apartment complex in Roanoke, Virginia, pictured, which left two people seriously injured

Adam Lee, special agent in charge of the FBI's Richmond Division, said: 'The FBI is working with the police department following the incident that occurred on Saturday evening.

'While I cannot discuss details of the investigation at this time, I do want to reassure the community that we are working to determine the nature of the incident.'

Police responded to emergency calls on Saturday saying that a male and a female were attacked as they attempted to enter The Pines apartment complex.

According to a statement released by police: 'While officers were at the hospital with the victims, a male, subsequently identified as 20-year-old Wasil Farooqui of Roanoke County, came into the emergency room suffering from injuries of his own. He met the description of the suspect in the stabbing.'