The rescue took place as life savers at Lennox Head, a beach popular with surfers south of the city of Brisbane, were preparing for a training session on using drones to pull swimmers to safety.
The practice turned into a real rescue when someone noticed that two men swimming outside safety flags were in trouble in a 3-metre swell, the Australian government said in a statement.
Lifeguards launched the drone, steered it towards the swimmers and dropped a “rescue pod” into the water, where it expanded so the swimmers could grab it and swim to shore.
“Never before has a drone fitted with a flotation device been used to rescue swimmers like this,” said John Barilaro, the deputy premier of New South Wales state.
The rescue took just 70 seconds. The two swimmers were exhausted but unharmed.