A 21-year-old British woman has died and a 30-year-old British man is in a critical condition after being stabbed at a backpackers' hostel in Queensland, Australia, by a man who allegedly shouted "Allahu Akbar" during the attack.
Queensland Police Service said up to 30 people witnessed the "senseless act of violence" in which a 46-year-old local man also suffered non life-threatening injuries.
A 29-year-old French national has been arrested.
The stabbing took place at an accommodation complex in the Home Hill area of Queensland at around 11.15pm local time on Tuesday, police said.
In a press conference, deputy police commissioner Steve Gollschewski said the investigation was in its early stages and all motivations were being considered, including criminal and political, as well as the impact of drugs and mental health problems.
He said: "Initial inquiries indicate that comments which may be construed as being of an extremist nature were made by the alleged offender.
"It is alleged that the suspect used the phrase 'Allahu Akbar' during the attack and when arrested by police."
Detective Superintendent Ray Rohweder from the Queensland Police Service said officers were confronted with a "terrible scene" when they arrived.
The woman was found dead at the scene and the British man was rushed to hospital in a critical condition.
Mr Gollschewski said the families of both victims had been contacted with the help of the British consulate.
He said: "Our thoughts and condolences are with those families and their loved ones at this difficult time."
He said he could not tell reporters how long they had been in the country and whether they knew each other was part of the investigation but they were all staying at the same accommodation.
The 46-year-old man has been released from hospital. Police said a dog had also been fatally injured in the attack.
The man taken into custody has been transferred to hospital for treatment for what police believe are non life-threatening injuries sustained in the incident.
He is a visitor to Australia who has been in the country since around March on a temporary visa and has no known local connections, Mr Gollschewski said.
He said they were still trying to find out what he has been doing in the country since his arrival but he was not known to police before the attack.
Police are not searching for anyone else in relation to the incident and there is no known ongoing threat to the community.
Mr Gollschewski added: "This is not about race or religion. It is individual criminal behaviour."
Queensland Police said on Twitter: "This was a senseless act of violence."
"Our community should feel reassured that the investigation is thorough."
Australian Federal Police and the country's Border Force are also involved in the investigation.
The fact that the suspect shouted the phrase "Allahu Akbar" - which means God is Greatest in Arabic - had been confirmed as officers were wearing body-worn video cameras.
He is believed to have been acting alone. Police have retrieved a knife which is believed to have been the weapon.
Mr Gollschewski said the woman was the first person to be attacked and that the incident was at the moment being treated as a murder case, not a terror attack.
A Foreign Office spokesman said: "We are working with local authorities and providing support to the families of a British national who was killed and another critically injured in an incident in Australia.
"Our thoughts are with the family at this difficult time".
British high commissioner to Australia Menna Rawlings boarded a flight to Townsville after reports of the incident emerged.
A spokeswoman for the British High Commission in Canberra said: "We are working with local authorities and providing support to the families after one British national was killed and another critically injured in an incident in Australia.
"Our thoughts are with the families at this difficult time. High Commission staff have deployed to Townsville and we remain in close contact with local authorities."
The attack took place at Shelley's Backpackers accommodation in Home Hill, police said.
The hostel is in small town which is a popular place for backpackers to find fruit picking work and is about 62 miles from the coastal city of Townsville in North Queensland.
Mr Rohweder said witnesses have described what happened during the attack.
He said: "Witnesses have said that they have observed the person attacking one of the persons and as a result of that there was another altercation and subsequently the male person has gone back upstairs at the accommodation complex."
Two police officers then arrived and he said they acted "superbly" to ensure the safety of other people at the complex
The suspect was then asked to lie on the ground, which he did, before being taken into custody.