Jan Thielmann scored in injury time to help Cologne move to sixth place in the Bundesliga with a 3-1 win at Hertha Berlin on Sunday.

Anthony Modeste and former Hertha player Ondrej Duda also scored as Cologne won its third straight league game and went ahead of Union Berlin on goal difference.

Hertha had to contend with coronavirus infections during the week. Santiago Ascacibar and Lucas Tousart recovered in time to play — the latter as a substitute — but coach Tayfun Korkut was without defender Dedryck Boyata and forward Ishak Belfodil.

Berlin's Jordan Torunarigha, left, and Cologne's Anthony Modeste, right, challenge for the ball during the German Bundesliga soccer match between Hertha BSC Berlin and 1. FC Cologne in Berlin, Germany, Sunday, Jan. 9, 2022.  (Andreas Goradpa via AP)

Berlin's Jordan Torunarigha, left, and Cologne's Anthony Modeste, right, challenge for the ball during the German Bundesliga soccer match between Hertha BSC Berlin and 1. FC Cologne in Berlin, Germany, Sunday, Jan. 9, 2022. (Andreas Goradpa via AP)

Duda and Mark Uth missed good chances for Cologne before goalkeeper Marvin Schwäbe foiled Myziane Maolida with Hertha’s best chance in the 28th.

Uth crossed for Modeste to head the opening goal a minute later, and Duda returned a half-cleared ball to make it 2-0 in the 32nd.

Referee Tobias Stieler was replaced at the break by Alexander Sather due to an apparent injury.

Berlin's Santiago Ascacibar, left, and Cologne's Salih Ozcan challenge for the ball during the German Bundesliga soccer match between Hertha BSC Berlin and 1. FC Cologne in Berlin, Germany, Sunday, Jan. 9, 2022.  (Andreas Goradpa via AP)

Berlin's Santiago Ascacibar, left, and Cologne's Salih Ozcan challenge for the ball during the German Bundesliga soccer match between Hertha BSC Berlin and 1. FC Cologne in Berlin, Germany, Sunday, Jan. 9, 2022. (Andreas Goradpa via AP)

Hertha looked a shadow of the team that beat Borussia Dortmund before the winter break, but the home team improved. Darida pulled a goal back in the 57th when his free kick managed to evade teammates and opponents alike before nestling inside the far post.

Hertha defender Niklas Stark gifted the visitors a great chance midway through the second half, when he drew a fine save from his own goalkeeper Alexander Schwolow with a misplaced back-pass. Schwolow was forced to use his hand, giving Cologne a free kick inside the penalty box. But the Hertha ’keeper produced another save to deny Uth from close range.

Hertha kept trying at the other end but lacked a cutting edge.

Cologne's Ondrej Duda celebrates after scoring his side's second goal during the German Bundesliga soccer match between Hertha BSC Berlin and 1. FC Cologne in Berlin, Germany, Sunday, Jan. 9, 2022.  (Andreas Goradpa via AP)

Cologne's Ondrej Duda celebrates after scoring his side's second goal during the German Bundesliga soccer match between Hertha BSC Berlin and 1. FC Cologne in Berlin, Germany, Sunday, Jan. 9, 2022. (Andreas Goradpa via AP)

Thielmann, a substitute, sealed the win on a counterattack in injury time when he won the ball off Darida and rounded the goalkeeper before scoring.

Bochum hosted Wolfsburg later Sunday.

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports

Ciarán Fahey on Twitter: https://twitter.com/cfaheyAP