by a whisker
By a very small distance.
I'm lucky to be alive. The bus missed me by a whisker.
In the executive branch, winning by a whisker is as good as winning in a landslide, but not so in the Senate. Lincoln Chafee
Although it was a very close election, I don't think it was a polarised election. It was a tough fought contest but it was not a divisive contest. Although he won by a whisker I think the party will unite behind Ed Miliband. Harriet Harman