SYDNEY — Australian police were investigating whether a French man accused of fatally stabbing a British woman while shouting the Arabic phrase “Allahu akbar” had a romantic obsession with her, an official said Thursday.

Police in Queensland state said there was no indication the attack at a northeast Australian hostel was motivated by extremism. But they are looking into whether the suspect, 29-year-old Smail Ayad, had been rejected by 21-year-old Mia Ayliffe-Chung before police say he stabbed her to death on Tuesday, Queensland Police Detective Superintendent Ray Rohweder said.

“That is one of the lines of inquiry that we are conducting. There is certainly, at this stage, no indication that — certainly from Mia’s point of view — that there was any sort of romantic connection,” Rohweder told reporters.

Though police said Ayad shouted “Allahu akbar” — the Arabic phrase meaning “God is great” — both during the attack and while being arrested, there was no evidence he had been motivated by any extremist ideology, Rohweder said.

“There is absolutely no indication of any form of radicalization or any political motive in this matter,” he said.

The attack took place Tuesday night in front of dozens of backpackers at a hostel in the town of Home Hill, south of Townsville in northern Queensland. Ayliffe-Chung was found dead at the scene and a 30-year-old British man who tried to stop the attack was seriously wounded. He was in critical condition with injuries to his head. A dog was also killed in the attack.

Ayad was charged on Thursday with one count of murder, two counts of attempted murder, one count of serious animal cruelty and 12 counts of serious assault. He is due to appear in court on Friday.

Witnesses told police Ayad had been acting out of character in the hours leading up to the attack. Police believe he had consumed cannabis during the evening, but there was no evidence he had been drinking or taking harder drugs, Rohweder said.

While transporting Ayad from a hospital to the police station in Townsville on Wednesday, Ayad became “extremely violent,” forcing police to stop the vehicle to restrain him, Rohweder said. The detectives received cuts and abrasions and a bite to the leg during the scuffle, and had to use a taser and pepper spray to subdue him.

Ayad was given a psychiatric assessment, but Rohweder declined to release the results.

Ayad had traveled to Australia twice in the past year. He returned in March on a temporary visa and had been in Home Hill for about a month, police said.

Ayliffe-Chung had only arrived in Home Hill a few days before the attack. She had been planning on exploring Australia and hoped to be sponsored for a visa that would allow her to stay longer in the country she had fallen in love with, said her friend, Jamison Stead.

Stead, who met her in April when she was living in Surfers Paradise on Australia’s Gold Coast, said she had a passion for life that was contagious.

“She was a beautiful girl who had her whole life ahead of her and we spoke of what the future may hold in store for her and what she wanted to do,” he said in an e-mail. “It’s sad knowing that she won’t be able to do those things.”

In an appearance on the BBC, Ayliffe-Chung’s stepfather tearfully read a statement on behalf of her mother, Rosie Ayliffe.

“Not only was she kind and funny, she was clever, sassy, with a sense of fun,” Stewart Cormack said. “Mia was full of the kind of open-minded compassion for life that you don’t see that often. It felt as though she was reminding us all of the beauty and possibilities we each have that we should live life to the full.”

In a statement, the British school Ayliffe-Chung previously attended described her as a joyous person who was well-liked by her friends and teachers.

“Mia was a bubbly student who was energetic, caring and who immersed herself in life, enriching the school environment she contributed to,” said Paul Lovatt, head of pastoral care at Anthony Gell School in the town of Wirksworth.


Associated Press writer Danica Kirka in London contributed to this report.