A French national allegedly cried "Allahu Akbar” during a stabbing attack that left a 21-year-old British woman dead and two others injured at a backpackers hostel in Australia, media reported on Wednesday.

The 29-year-old man went on a stabbing spree late on Tuesday night at a backpackers hostel near Townsville in northern Queensland state.

The suspect was arrested at the crime scene and the investigators took possession of the knife allegedly used in the attacks.

The Australian and British media identified the deceased as Mia Ayliffe-Chung, from Derbyshire, who was reported to be days into a three-month working holiday in the area after having worked in a bar in the Gold Coast, the Guardian reported.

Chung lived in Surfers Paradise on the Gold Coast and worked as a waitress at the Bedroom Lounge Bar before making the 800-mile trip north to work outdoors.

The investigations revealed comments that could point to extremist Islamic motivations, it was not yet fully determined if the attack was terror-related, Steve Gollschewski, Deputy Commissioner of Queensland Police, said on Wednesday.

"While this information will be factored into the investigation, we are not ruling out any motivations at this stage, whether they be political or criminal," Gollschewski said.

"Investigators will also consider whether mental health or drug misuse factors are involved in this incident," he said.

Besides the woman, a British man, 30, was in a critical condition with stabbing wounds. A local man, 47, who intervened suffered non life-threatening injuries, and also a dog at the hostel was fatally wounded.

The French national had entered Australia lawfully in March on a temporary visa, and was not on any watch lists, Gollschewski said.

"This is not about race or religion. It is individual criminal behaviour," Gollschewski said. 

"While this matter is being treated as a homicide, the Queensland Police Service will continue to work with its federal counterparts in relation to the investigation," he said.

Sharon Cowden, an Australian federal police commander, said at the same press conference that while the alleged killer had no known links to extremist groups, investigators would be “speaking to all appropriate international law enforcement” to examine this.

“Any line of inquiry that takes us to international law enforcement we will follow,” she said.

Cowden condemned the attack as a “senseless act of violence”.

Earlier on Wednesday, Superintendent Ray Rohweder told reporters in Townsville that investigators were "still trying to piece together what has happened — we don’t have a motive yet".

"Police were confronted with a terrible scene when they arrived," he said adding: "There were up to 30 people who witnessed the incident."

Police was in contact with the British consulate which would liaise with the victims’ families, Rohweder said.

Bill Byrne, the Queensland Minister for Police, Fire and Emergency Services, described the incident as "tragic and disturbing".

Ali Kadri, an Islamic Council of Queensland spokesman called for caution in public discussion before full facts were known, saying speculation about an act of terrorism was "actually empowering the terrorists".

"We have to be careful about trying to connect every single murder committed by a Muslim to terrorism," he said, adding: "To speculate it’s (an act of) terrorism… what is going to happen now is ISIS are going to pick up on it, they’re going to claim it, and they’re going to look stronger than they are."

Australia has been on high alert for terror attacks since September 2014, suffering several attacks including the lone wolf-style murder of Police accountant Curtis Cheng at a Western Sydney police station in 2015.

The authorities have conducted 16 counter-terror operations since 2014, arresting 44 alleged home-grown terrorists.