Mo Farah finished second behind surprise winner Ellis Cross as the four-time Olympic champion returned to competition for the first time in 11 months at the Vitality London 10,000.
Farah, who last raced in June 2021, was unable to out-kick Cross, who won by four seconds in 28 minutes 40 seconds.
Before the race Farah said it would not "make any sense" to keep racing if he could not compete at the top level.
"Today was tough and Ellis did well to beat me," Farah, 39, told BBC Sport.
Farah, who was unable to qualify for the Tokyo Olympics after fracturing his foot in the build-up to qualifying, added: "It is really important to test your body and see where you are. It has been so long since my last race.
"I love the sport and what I do. I have had a long career. Your body has to be ready. You have to be in the right frame of mind and compete with the guys. You have to say where you are... I ain't young any more am I?"
Cross shines as McColgan goes close
Eilish McColgan narrowly missed bettering Paula Radcliffe's British recordCross, who represents Aldershot, Farnham & District, said he "didn't quite follow the script" in upsetting Farah in front of a London crowd that cheered him on in the 16,000-strong event.
"I can't believe it," Cross, who hails from Polesworth in Warwickshire, told BBC Sport.
"I didn't believe it until 20 metres from the finish. I thought he would just out-kick me. I can't explain the feeling, it's overwhelming. I have beaten somebody who is like an idol. He is known around the world and I have beaten him over his prime distance. Nobody knows who I am but the crowds are cheering."
Great Britain's Eilish McColgan dominated the women's field and finished just two seconds behind Paula Radcliffe's 19-year-old British and European 10,000m record.
McColgan, 31, clocked 30:23, which was enough to at least set a Scottish record, bettering the mark of 30:39 set by her mum Liz in 1989.
"I am really happy," McColgan told BBC Sport. "I'm disappointed to just miss it but hopefully I will have another couple of opportunities this year. For me this is one of the harder records. Part of me didn't believe I could do it. It has given me a lot of confidence."
In the elite wheelchair races, Great Britain's Danny Sidbury took the men's event in 21:23, while Samantha Kinghorn showed her versatility in transitioning from sprint disciplines to win in 24:45.
Kinghorn told BBC Sport she will switch her focus back to the track: "I'll hopefully go to the Commonwealth Games and do a 1500m and then I'll be stepping it down for the sprints in Paris for the Paralympics.
"I don't feel any pressure on the road and love it."