British number one Kyle Edmund's US Open campaign was ended in the first round for the second year running.
Last year Italian Paolo Lorenzi was the beneficiary of Edmund's below-par display. Fast forward 12 months and Pablo Andujar, a 33-year-old Spaniard, outlasted the 30th seed.
A close match featuring 13 breaks of serve – seven for Andujar – swung in a marathon fifth game in the deciding set.
Edmund was unable to get over the line on his own serve, and did not win another game in a 3-6 7-6 (1) 7-5 5-7 6-2 defeat.
Earlier, Edmund had recovered from dropping his opening service game to take the first set with relatively little drama, and looked on course for a routine win when a break up in the second.
The clubbing Edmund forehand was cranking up to speed and Andujar was struggling to stay with him.
But suddenly a sloppy service game saw Edmund 0-40 down and Andujar, ranked 70 in the world, took advantage before running away with the tie-break.
Andujar has struggled with injuries for much of his career but he was suddenly looking the sprightlier as the rallies progressed.
He nicked a tight third set, Edmund responded in kind in the fourth, but he came up short in the decider as Andujar celebrated a first Flushing Meadows win since 2014.