RB Leipzig will play Freiburg in the German Cup final after a last-gasp goal by substitute Emil Forsberg gave them 2-1 home win over Union Berlin on Wednesday, securing them a spot in its third final in four years.

Sweden international Forsberg scored with a bullet header to seal the game for the hosts in stoppage time.

READ | PSG on the verge of 10th title after 3-0 win at Angers

Union midfielder Grischa Proemel had a chance to open the scoring in the 15th minute following a corner kick but his low shot from the edge of the six-yard box was just off target, while his follow-up strike found the side-netting.

Winger Sheraldo Becker, however, gave visitors the lead 10 minutes later, after he received a superb lofted pass from Christopher Trimmel and finished with a fine first-time shot from inside the box.

The home side had a chance to grab an equaliser in the 37th, but striker Andre Silva's effort was just wide of the right post.

Union, meanwhile, could have doubled their lead 12 minutes into the second half when Becker passed across the face of the goal but Nigerian forward Taiwo Awoniyi arrived a fraction late.

Instead, Silva levelled for Leipzig from the spot after an hour for his 15th goal of the season in all competitions, after Christopher Nkunku was fouled by defender Paul Jaeckel and the penalty was awarded following a VAR review.

READ | Tuchel rails against Chelsea's defensive mix-ups

Leipzig, who is third in the Bundesliga standings, has not lost any of its last 15 games in all competitions and remain unbeaten since Feb. 5.

It will head into the May 21 final in Berlin in search of their first major trophy having lost the 2021 final 4-1 to Borussia Dortmund and suffered a 3-0 defeat to Bayern Munich in 2019.

Union, sixth in the Bundesliga and five points outside the Champions League places, will be back at the RB Arena on Saturday to face Leipzig in the league.