By Ian Simpson

(Reuters) - The FBI is investigating a double stabbing by a Virginia man who shouted the Muslim phrase "Allah Akbar," while authorities on Tuesday denied media reports that the attack may have been an attempted beheading.

The suspect, Wasil Farooqui, 20, of Roanoke, is charged with randomly attacking a man and woman with a knife on Saturday when they entered a Roanoke apartment building, Roanoke County police said.

The man and woman were severely injured. The man fought off the attacker, who was shouting "Allah Akbar," police said. The phrase means "God is greatest" in Arabic.

Farooqui is being held without bond at the Western Virginia Regional Jail near Roanoke, about 200 miles (320 km) southwest of Washington.

Police contacted the Federal Bureau of Investigation about the attack. Adam Lee, special agent in charge of the FBI’s Richmond Division, said the agency was working with police.

“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,” he said in a statement.

NBC News quoted federal law enforcement sources as saying that there was no evidence that the attack was linked to the militant Islamic State.

Amy Whittaker, a spokeswoman for Roanoke County, denied reports by Fox News, ABC and others that the attack may have been an attempted beheading.

"I'm not sure where that information came from but it is not accurate," she said in an email.

NBC said Farooqui told authorities he heard voices and investigators believed the most likely explanation was that he was mentally disturbed rather than terrorist-inspired.

Police arrested Farooqui when he showed up injured at a hospital emergency room. He is charged with two counts of aggravated malicious wounding.

NBC News reported that Farooqui was known to the FBI, which had earlier looked into his travel. He may have tried to get to Syria, where the Islamic State is recruiting sympathizers, but was not charged with anything after the FBI examined his travel.

Federal law enforcement officials say both victims in the attack are Muslim, though the attacker may not have known that, NBC said. A spokeswoman for the FBI declined to comment.

(Reporting by Ian Simpson in Washington; Editing by Frances Kerry, Bernard Orr)