Croatia were forced to dig deep as they came from behind to beat unfancied Azerbaijan 2-1 at home in their opening Euro 2020 Group E qualifier after forward Andrej Kramaric scored a 79th winner on Thursday.
The Croatians dominated from the start at Maksimir stadium but the Azeris stunned the vocal home crowd when forward Ramil Sheydaev gave them a 19th-minute lead with a superb goal.
Sheydaev, who came close to scoring two minutes earlier, beat central defender Duje Caleta-Car with some neat footwork before drilling the ball past keeper Lovre Kalinic.
Croatia piled on the pressure and captain Luka Modric glanced a header just wide from a cross by Borna Barisic shortly before the left back levelled with his first international goal.
Caleta-Car saw his header from a corner cleared off the line by Dmitri Nazarov but Barisic was well placed to scramble home the equaliser from close range in the 44th.
Agayev also dealt with a flurry of crosses from either flank as the packed visiting defence came under relentless pressure but he could do nothing about Kramaric's sumptuous strike.
A ricochet off a defender fell kindly for the striker, who side-stepped his marker before unleashing an unstoppable shot into the far corner from 15 metres to delight the home fans.
On Sunday, Wales open their Group E campaign at home to Slovakia while Croatia visit Hungary.