A 21-year-old British woman has been stabbed to death at a backpackers' hostel in Australia by an attacker shouting "Allahu Akbar".

As well as fatally injuring Mia Ayliffe-Chung, the 29-year-old French man left a 30-year-old British man fighting for his life.

The knife attack took place at Shelley's Backpackers accommodation in the Home Hill area of Queensland at about 11.15pm local time on Tuesday, police said.

Miss Ayliffe-Chung, from Derbyshire, was in the country on a three-month trip and had been working as a waitress.

Friends have paid tribute to the "free spirit", who was only days into a three-month trip working with animals on a farm and had been sharing updates on Facebook.

Her latest post, on Saturday, read: "Day 4 done. Just 85 left! Skills achieved; the ability to tell the difference between a rock and a clump of mud and throwing stones really far. The sun is too hot. Stupid Australia."

Amy Browne, 19, from the Gold Coast, worked as a bartender at the Bedroom Lounge Bar where Miss Ayliffe-Chung was a waitress.

She told the Press Association: "Mia was honestly the most bubbliest and most caring girl I knew.

"She got along with everyone she met, she just had that gorgeous personality that everyone seemed to enjoy.

"She always had a smile on her face, so innocent and full of life and love. Our memories will be cherished forever and I know she'd want us all to stay positive in the darkest of times. Rest in peace my beautiful friend, heaven has truly gained another angel."

Queensland deputy police commissioner Steve Gollschewski said all motivations for the attack 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."

Police 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.

Detective Superintendent Ray Rohweder, from the Queensland Police Service, said officers were confronted with a "terrible scene" when they arrived.

The suspect was arrested and transferred to hospital for treatment for non life-threatening injuries.

He had been visiting Australia since March on a temporary visa and has no known local connections, Mr Gollschewski said.

Mr Rohweder added that the man was not known to police, and detectives were still trying to discover what he had been doing in the country since his arrival.

The attacker is believed to have been acting alone and police have retrieved a knife, thought to have been the weapon involved in the stabbing.

A spokeswoman from 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."