AGF came close to catching the hosts cold already in the first minutes, when Tobias Bach headed the ball inches past the goal.
But hte hosts dominated the opening stages and took a deserved lead after 19 minutes when Oliver Sorensen was pulled down in the box by Tobias Bech and after a lengthy VAR check, Sorensen converted the penalty.
After the break, FC Midtjylland initially continued to be in charge of the game but the visitors fought hard to turn the tide in their favor and were deservedly rewarded after an hour's play.
Tobias Bech played the ball wide to Tobias Bach, who sent in a low cross the box for the onrushing Kristan Arnstad who angled the ball past Jonas Lössl to restore parity.

Bad then turned to worse for the home side, when Valdemar Byskov received a straight red card soon after elbowing Felix Beijmo.
However, when the momentum seemed all in AGF's favor, the home side struck back, when Henrik Dalsgaard clumsily hooked Dario Osorio in the box and Franculino cooly converted the penalty.
Followingly Tobias Bech lost his head, when he received his second bookable offence for a tough tackle on Mads Bech Sorensen and the home side put the final nail in the AGF coffin, when Osorio rounded Leopold Wahlstedt to make it 3-1.
The 3-1 win means that FC Midtjylland kept up the pace with FC Copenhagen, who beat Brondby earlier on Sunday. Thomas Thomasberg's men are still one point adrift of FC Copenhagen with three matches left to play.