(4-4 on aggregate, Qarabag progress on away goals)
Linfield's dream of becoming the first Irish Premiership club to reach the Europa League group stages is over after a huge effort in Azerbaijan fell agonisingly short.
The Blues took a 3-2 lead to Baku after last week's outstanding display at Windsor Park.
Qarabag - who knocked Dundalk out of the Champions League qualifiers - stormed out of the traps, taking the lead on the night after six minutes thanks to a low Jaime Romero strike.
Abdellah Zoubir then got an insurance goal for the hosts with two minutes to go but Shayne Lavery's fine finish in injury-time gave Linfield a glimmer of hope.
Ultimately, it wasn't to be as Qarabag saw it out to progress.