But for a few manic second-half minutes, Al Ain seemed destined to leave Doha with one foot firmly in the last 16 of the Asian Champions League.
The Pro League champions dominated the opening 45 minutes at the Ahmed bin Ali Stadium against Al Rayyan, the modest Qataris, and continued to confirm their superiority after the break.
Mirel Radoi, Omar Abdulrahman, Mohaned Salem and Alex Brosque had each gone close as a sprightly Al Ain dominated with both vision and verve.
Danger always lurked in Nilmar, the Brazilian with experience in Spain's Primera Liga, but Rayyan largely chased shadows, unable to contain the visitors' considerable craft.
Then, just before the hour, the hosts snatched an unlikely lead. A quick exchange of passes from Fabio Cesar and Rodrigo Tabata found Nilmar beyond the Al Ain defence, the former Villarreal striker expertly rounding Mahmoud Al Mas to stroke the ball into an empty net.
Startled, Al Ain emerged from their stupor and swiftly reverted to type: passing and probing, creating chances but failing to restore parity. Then, on 78 minutes, the substitute Yousuf Ahmad swivelled on the edge of the home side's penalty area to force a smart save from Omar Bari in the Rayyan goal. From the resultant corner, an unmarked Ahmad headed home.
Parity restored, Al Ain pushed for the winner that would have all but sealed qualification. Again Ahmad fashioned an opening, the youngster flashing his shot across goal from an acute angle, while Brosque sent Mohammed Abdulrahman's flicked pass crashing off the Rayyan crossbar.
Rayyan quickly countered, Tabata once more finding Nilmar behind the Al Ain back line. The nimble forward's effort was blocked brilliantly by Al Mas, but Jaralla Al Marri pounced first to seal three precious points for Diego Aguirre's men.
Al Ain are now looking nervously over their shoulder, in Group D. Next up, on April 23, a potentially defining fixture in Riyadh with Al Hilal and Yasser Al Qahtani, a former colleague. Comradeship will be less important that night for Al Ain than finding their killer instinct.
Follow us @SprtNationalUAE