Mikel San Jose kept Athletic Bilbao's European hopes alive by ending Shakhtar Donetsk's chances of topping Champions League Group H.
San Jose's 68th-minute strike at the Arena Lviv secured a 1-0 win for the Spaniards and that, coupled with leaders Porto's 3-0 victory in Borisov, ensured the Portuguese side will head the group with the Ukrainians second no matter what happens when the two sides meet at the Estadio do Dragao in the final round of fixtures.
For their part, Athletic will host BATE knowing a point will secure the consolation of a place in the Europa League.
Shakhtar, who had scored 14 goals in their four previous group games, could have been ahead within seven minutes when striker Alex Teixeira was played in on goal, but his shot was blocked by goalkeeper Gorka Iraizoz.
But the visitors had an early opportunity when central defender San Jose glanced a 26th-minute header wide of the far post from a left-wing free-kick.
Teixeira curled a right-foot shot just wide after combining with Taison following Douglas Costa's powerful 37th-minute run, but Iker Muniain went just as close with a long-range strike at the other end three minutes later.
Costa dragged a 45th-minute effort wide after sprinting through the heart of the Athletic defence, but he did test Iraizoz in similar fashion four minutes into the second half.
Luiz Adriano sent a 55th-minute half-volley disappointingly wide after good work by Costa and Taison, the latter of whom shot wastefully at the keeper seconds later.
But it was Bilbao who took the lead with 22 minutes remaining when San Jose stabbed home Benat's free-kick with the Shakhtar defence sleeping, and that proved enough to claim the points.
However, the home side were left appealing in vain for a last-minute penalty after Marlos' shot appeared to strike the arm of defender Mikel Balenziaga, although not in the opinion of referee Mark Clattenburg.