However, after he returned from Turkey, he was elected as a representative in the Federal Parliament of Yugoslavia. As of the 2000 election, when Slobodan Milošević was overthrown, Ugljanin created a successful cooperation with Vojislav Koštunica and Velimir Ilić, siding in a coalition with them. Between 2004 and 2008 he was a mayor of Novi Pazar. During this period, his influence amongst Bosniaks in the Sandžak region became very strong with the approval from the central government in Belgrade, led by Koštunica at the time.