Ajax were looking for their third consecutive victory in the Eredivisie when they paid a visit to FC Groningen.
The host team, who have not defeated Ajax since 2014, broke the deadlock after 14 minutes. Tom van Weert had just to tap in a good cross from Morocco's Mimoun Mahi to make it 1-0.
FC Groningen was awarded with penalty after defender Joel Veltman handball in the 24th minute. Mimoun Mahi stepped up to take the penalty but Ajax goalkeeper Andre Onana tipped the ball out.
After the interval, the visitors took the initiative in the game, and Justin Kluivert scored his seventh goal of the season with a header in the 64th minute.
With Ajax looking for the winner, Veltman saw his second yellow card after tackling van Weert in the 87th minute leaving his team with 10 in the final minutes of the match. However just two minutes later, 34-year-old Klaas-Jan Huntelaar scored the winner assisted by Kluivert. It was Huntelaar 11th goal of the season.
The game ended 2-1 for Ajax, who trail Eredivisie leaders PSV by seven points with both teams facing each other in two weeks. FC Groningen lie 14th with 29 points - six ahead Roda JC Kerkrade in the battle to avoid relegation.