Minnesota United wingback Anthony Markanich scored twice in a three-minute span late in the second half to rally the Loons to a 3-2 victory over St. Louis City on Wednesday night at Allianz Field in the U.S. Open Cup round of 16.

St. Louis had scored twice in an eight-minute span early in the second half to take a 2-1 lead. Markanich tied the score in the 85th minute and then gave the Loons the lead in the 88th minute.

He scored once with his left foot and once from a header off a corner kick to send Minnesota to an unlikely victory.

The goals gave Markanich four in his last four games — impressive, given that his career high for a season was five, set in his senior season at Northern Illinois.

Kelvin Yeboah scored in the 10th minute to give the Loons a 1-0 lead, but Marcel Hartel scored in the 57th minute and Joao Klauss tallied in the 65th minute to put St. Louis ahead.

The Loons advance to the U.S. Open Cup quarterfinals, which will be played July 8-9.

The Loons and St. Louis were playing for the second time in five days. The Loons won 3-0 on Saturday in St. Paul in an MLS regular-season game.

The Loons will learn their U.S. Open Cup quarterfinal opponent Thursday.

Jon Marthaler contributed to this report.