Denmark got off to a slow start before overwhelming Gibraltar 6-0 on Friday to take over the top of Group D and set up a decisive Euro 2020 qualifier in Dublin on Monday.
Denmark will qualify for next year's European Championship if they avoid defeat against Ireland at the Aviva Stadium, after moving 3 points clear of the Irish.
But they will need to sharpen up their play after making heavy weather of beating tiny Gibraltar, whose population is not much more than the 24,033 who watched the game at Copenhagen's Parken Stadium.
Denmark, unbeaten in the qualifiers, were ahead only 1-0 at halftime and had lapses of concentration by the part-timers to thank for their goals rather than their own ingenuity.
Winger Robert Skov opened the scoring in the 11th minute after Gibraltar's diminutive goalkeeper, Kyle Goldwin, twice failed to hold on to the ball but for the rest of the half the hosts battled to break down a determined defence.
Straight after the break, Goldwin mistimed coming out to cut off a long kick upfield from the Danes and the pace of striker Christian Gytkjaer allowed him to get to the pass first and slide it home.
Martin Braithwaite converted an easy tap in 4 minutes later after Goldwin parried Christian Eriksen's square pass into his path and Skov grabbed a second for himself in the 64th minute as Gibraltar's defence failed to clear a cross.
Eriksen scored the fifth with a shot from outside the penalty area 6 minutes from time and then added another with the last kick of the match as a clearance was kicked straight at him.
Denmark have 15 points from seven matches, one more than second-place Switzerland, who finish their campaign away at Gibraltar on Monday.
Ireland must beat Denmark to qualify.