WARSAW, Poland (AP)Ukrainian team Shakhtar Donetsk’s Champions League campaign ended in a 4-0 loss on Wednesday to Leipzig, whose striker Timo Werner came off hurt ahead of the World Cup.

Shakhtar had overcome a series of formidable obstacles just to play in European competitions this season and would have reached the knockout stage with a win.

Leipzig advanced by finishing second in Group F behind Real Madrid, which beat Celtic 5-1, while Shakhtar continues its season in the Europa League.

The Ukrainian champion saw key foreign players leave after Russia invaded Ukraine, along with coach Roberto de Zerbi, and had to host its Champions League opponents in neighboring Poland. Its Ukrainian league game against Oleksandriya last week was interrupted by an air-raid alert.

Unlike in Shakhtar’s stunning opening 4-1 win at Leipzig in September, which led Leipzig to fire then-coach Domenico Tedesco, Leipzig was ready for the Ukrainian team’s hustling counterattacking style, and the skills of promising 21-year-old winger Mykhailo Mudryk.

A draw would have been enough for Leipzig to advance, but the German team wasted little time in chasing the win. Christopher Nkunku opened the scoring in the 10th on the rebound after goalkeeper Anatoliy Trubin parried Werner’s shot.

Andre Silva doubled the lead soon after the break when he bundled in the ball at the far post off Mohamed Simakan’s header. Dominik Szoboszlai scored on the counterattack soon after and Dani Olmo curled in Leipzig’s fourth in the first Leipzig attack since he came off the bench.

Werner, a Germany forward, was substituted in the 19th minute after signaling to the bench in apparent pain after he played a pass. Germany’s opening game of the World Cup is against Japan on Nov. 23. Coach Marco Rose said Werner had been in pain but the team doctor had indicated that nothing serious appeared to be wrong, though he needed to undergo more detailed examinations, in comments reported by German agency dpa.

Leipzig condemned intrusive treatment of its fans during searches at the stadium, including cases where the club said a flashlight was shone into supporters’ underwear. Security personnel and Polish police were both involved in the checks and ”in particular, the police checks were disproportionate,” the club said in a statement.

Several fans had scarves confiscated during security checks and two people were taken into custody, Leipzig said, adding it was in contact with the German embassy in Poland.

AP World Cup coverage: https://apnews.com/hub/world-cup and https://twitter.com/AP-Sports