within an ace of
within an ace of {informal} or within an inch of {adv. phr.}
Almost but not quite; very close to; nearly.
Tim came within an ace of losing the election.
John was within an inch of drowning before he was pulled out of the water.
Compare: BY THE SKIN OF ONE'S TEETH.
Categories:
Source: A Dictionary of American Idioms