The 34-year-old had been playing for Danish side Randers for the last two years, making a total of 69 appearances and keeping 21 clean sheets.

The goalkeeper has been capped 52 times for Iceland since 2011, with the team reaching Euro 2016 quarter-finals and qualifying for the World Cup for the first time in history.

In his three group-stage appearances at the tournament, Halldorsson conceded five goals and saved a penalty taken by Argentina captain Lionel Messi as Iceland held the two-time former champions to a 1-1 draw in their opening game.

His new club, Qaranag, claimed the Azerbaijani title by 16 points last season, and played in the UEFA Champions League, sharing their group with Chelsea, Roma and Atletico Madrid.