The fans took control of the club and tried to improve its finances to save it from going bankrupt and disappearing like three other major Slovenian clubs (Olimpija, Mura and Ljubljana), with reasonable success. In the 2005–06 season, Mladen Rudonja returned to the club and brought with him the Serbian-American businessman Milan Mandarić, who paid off all the remaining debts. After the first half of the season, before the arrival of the new patron, Koper was battling against relegation, but in the second part of the season, with a new coach, Milivoj Bračun, the club started an unbeaten run that led them to reach the third place in the Slovenian PrvaLiga and to win the Slovenian Cup for the first time, FC Koper's first trophy since the Slovenian independence from Yugoslavia. This also qualified the team to play in the UEFA Cup qualifying rounds in the 2006–07 season. The following seasons were more difficult, with the club narrowly avoiding relegation in 2009. In the 2009–10 season, the team was expanded and, under the leadership of veteran playmaker/director-of-football Miran Pavlin eventually won the Slovenian league championship for the first time, winning a place in the UEFA Champions League qualifiers, where they were defeated by Dinamo Zagreb 5–4 on aggregate (1–5, 3–0). In the aftermath, Pavlin left the club.