photo finish
photo finish {n. phr.}
A close finish in a race of people or animals, where the camera must decide the actual result, sometimes by millimeters.
The black horse was declared the winner in a photo finish.
Categories:
Source: A Dictionary of American Idioms