A 29-year-old Frenchman shouted "Allahu Akbar" (God is Greatest) as he stabbed a British woman to death and wounded two people at a backpackers' hotel in northern Queensland, police said on Wednesday.

The man was in Australia on a valid tourist visa and had no known links to radical groups such as Islamic State, which has urged its followers to attack civilians with knives or other readily available weapons, police said.

A 30-year-old British man was in critical condition in hospital after the attack south of the city of Townsville late on Tuesday night.