win by a neck

win by a neck

succeed by a small margin.
See also: neck, win