The New Saints conceded two late goals as visitors Midtjylland took a firm grip of the Europa League qualifier.
Steven Evans headed the home side in front from a corner on 59 minutes, but the Danish side were level six minutes later through Rilwan Hassan.
A penalty allowed Danny Olsen to put Midtjylland ahead with four minutes remaining at Park Hall in Oswestry.
And then with almost the last kick of the game, Mads Albaek added a third with a superb individual effort.
Saints manager Mike Davies said his players paid the price for a lack of concentration.
"We gave everything but teams like that have always got another gear to go up," he said.
"Unfortunately for us they just notched it up a little bit and switched off. When you switch off against quality opposition they are going to punish you."
The New Saints: Harrison, Spender, Marriott, Baker, Evans, Ruscoe, Hogan, Matty Williams (Edwards 59), Jones, Draper (Sharp 67), Partridge (Chris Williams 72).Subs Not Used: Ramsey, Johnson, Seargeant, Darlington.
Goals: Evans 59.
FC Midtjylland: Jensen, Albrechtsen (Bak Nielsen 30), Kristensen, Poulsen, Janssen, Olsen, Ipsa, Pedersen, Hassan, Uzochukwu (Albaek 79), Igboun Emeka (Ikechukwu Nworuh 65).Subs Not Used: Lossl, Hvilsom, Salami, Sivebaek.
Goals: Hassan 65, Olsen 86 pen, Albaek 90.
Ref: Mihaly Fabian (Hungary).