Double Olympic champion Mo Farah was beaten into second by American Garrett Heath in the men's race at the Great Edinburgh Cross Country.
Farah, 32, lost out in a sprint finish as Heath won in 25 minutes 29 seconds.
"It is disappointing to lose but better to lose now than later in the year. I couldn't really sprint - it was very slippery," Farah told BBC Sport.
Fellow Briton Kate Avery, 24, recorded her first senior international victory in the women's race at Holyrood Park.
Avery took the lead in the early stages and finished the 6km course in 21:05 to win by four seconds.
Farah, competing in the event for the first time since winning in 2011, began his Rio Olympics preparations with a rare defeat over the 8km course.
The five-time world outdoor champion was at the back of the field in the early stages and, although he gradually moved through the pack, he appeared to struggle on fields made muddy by heavy rain.
Britain's Ross Millington and Callum Hawkins made the early running but Heath, 30, produced a decisive move on the final 1.5km lap to beat Farah by two seconds.
American Scott Fabul was third in 25:38 with Hawkins (25:41) fourth and Millington (25:43) fifth.