The Brownlee brothers ended a run of two triathlons without a podium finish as the World Series swept into Hamburg on Saturday.
The Leeds pair have also been without a first-place finish all season.
So, for Alistair to top the podium and Jonny to be third will have been of particular satisfaction.
Vincent Luis came between them with just four seconds covering all three come the finish line, with Alistair Brownlee’s time of 51 minutes and 43 seconds almost matched.
He held them off in a thrilling finish, though, breaking out on his own with 600 metres to go and not looking back.
“I knew it was safest to go a little way out and just try and run the legs off everyone with a big surge, and that’s how it worked out,” he said. “I think they’ve both out-sprinted me in the past so I wanted to have a bit of a gap.
“Over 500m it’s a running race, over 100m it’s a gamble, so I chose to go at 500-600m.”
Jonathan Brownlee remains in with a chance of the overall title but Alistair is out of the running.
“I’m pleased with that, I’m better than I was and getting back to my old self I think.
“This season has been about the Commonwealth Games for me, so I’m happy that I’m fit now,” he said.
In the women’s race, Jodie Simpson was Britain’s best finisher, ending up fifth as overall leader Gwen Jorgensen won.
The American’s time of 56.54 was just six seconds better than Australia’s Emma Jackson and Canada’s Kirsten Sweetland.
Simpson was 21 seconds down overall but moves up to second place in the series, with compatriot Helen Jenkins in third.
Jenkins was forced to withdraw from the race citing a foot problem.
Vicky Holland ended the event in seventh for GB with Lucy Hall 27th and Lois Rosendale 52nd.
Saturday’s event is the last before the Commonwealth Games, with editions scheduled for Stockholm and Edmonton after that.