UEFA says Scottish side Celtic has been reinstated to the Champions League playoffs after qualifying-round opponent Legia Warsaw was punished for fielding an ineligible player.

Legia won the third-round match 6-1 on aggregate after following up a 4-1 victory in the first leg with a 2-0 win at Murrayfield on Wednesday.

But the Polish side brought on Bartosz Bereszynski as an 86th-minute substitute in the second leg, even though he was suspended for the game.

UEFA says in a statement Friday that “the match has been declared as forfeit,” meaning Legia loses the game 3-0. That means the Scottish champions advance on away goals, with the aggregate score at 4-4.

The Scottish side lost the qualifying tie 6-1 on aggregate, but Legia’s oversight sees their 2-0 second-leg win overturned to a 3-0 defeat, meaning Celtic advance on away goals.