Farah, Britain’s four-times Olympic champion, plans to focus on road racing after the outdoor world championships in London in August when he will say his final farewell to the track.
The 33-year-old was helped to break the indoor mark at the Birmingham Indoor Arena in what became a two-way duel with Kenyan Albert Rop, who stretched him over the final two laps.
It was a fitting way for Britain’s most successful long-distance runner to end his indoor career – and a marked improvement on his only other appearance this season, when he came seventh in a cross-country event in Edinburgh last month.
“I knew from Edinburgh I needed to do some work,” he told the BBC. “I had to go away and leave my family behind to do more training. It has paid off. Hard work pays off.”
Farah shaved almost two seconds off the European record – and more than 12 off the previous British best – after pacemaker Adam Clarke had taken the 11-man field through a fast opening to the race.
Urging the crowd to raise the noise levels, Farah exuded his trademark calmness as he tucked in behind Rop for the final stages.
He hit the front with two laps to go before extending his lead, much to the joy of the large crowd.
Farah did not realise he had broken the record but paid tribute to the support he has received during his stellar career, in which he has won the Olympic 5,000 and 10,000-metres double twice.
“The crowds have been so good for me over the years. I will miss it,” he said. “I can’t quite believe it’s my last race.”
(Corrects winning time)
(Reporting by Neville Dalton, editing by Ed Osmond)