A club that lost its own city, but did not disappear from football, is Qarabağ of Agdam. It was founded in 1951 in Agdam under the name Məhsul and took its present name in 1987. In 1988, as Qarabağ, it won the championship of the Azerbaijan SSR, and in 1992 it became a founding member of the league of independent Azerbaijan. A year later it won its first title, as the first club from outside Baku. By then the war over Nagorno-Karabakh was under way, in which the club's head coach, Allahverdi Baghirov, was killed, and in 1993 the team had to leave the destroyed city of Agdam and relocate to Baku. Since then Qarabağ has been called the "refugee club".
The club's nickname is Atlılar ("The Horsemen") and its colours are black and white. It plays domestic matches at the Azersun Arena in Baku and European matches at the much larger Tofiq Bahramov Republican Stadium, named after the Azerbaijani linesman known from the 1966 World Cup final. Its main rival is Baku's Neftçi.
After the first title in 1993, the club waited 21 years for another. The breakthrough came in 2013–14, and since then Qarabağ has dominated the domestic game. It has won 12 league titles in all, the latest in 2024–25, the fourth in a row, and eight Azerbaijan Cups. For most of this period the team has been led by Gurban Gurbanov, and stability on the bench is regarded as one of the main reasons for the club's success.
The biggest successes have come in Europe. In 2017 Qarabağ eliminated FC Copenhagen in the Champions League play-offs (2–2 on aggregate, going through on away goals) and became the first Azerbaijani club to play in the group stage of that competition, in a group that included Chelsea. In 2021–22 it advanced from a European group stage for the first time, and in 2025–26 it again played in the Champions League league phase. The first match of that campaign, a 3–2 away win at Benfica, was also Qarabağ's first victory in the league phase of the Champions League. It also beat FC Copenhagen 2–0 at home and drew 2–2 with Chelsea, finishing the league phase in 22nd place.
The most famous night of that campaign was the match against Eintracht Frankfurt, played in Baku on 21 January 2026. Qarabağ twice came from behind: after Camilo Durán scored in the 4th minute, Eintracht equalised and went ahead with a penalty in the 78th minute, but Durán levelled in the 80th and Bahlul Mustafazade headed the winner in the 94th minute. The 3–2 result ended the German side's hopes of reaching the play-offs.
In 2025–26 the club's run of titles was broken by Sabah, which won the first championship in its history on 30 April 2026, while Qarabağ finished second. That does not change how the club is seen. Qarabağ of Agdam remains a national symbol for all Azerbaijanis and proof that a club can turn a tragic history into a major sporting and organisational success, without its own city but with the memory of it.