photo finish

[photo finish] {n. phr.} A close finish in a race of people oranimals, where the camera must decide the actual result, sometimes bymillimeters.

The black horse was declared the winner in a photofinish.