In 2007 , he served as prime minister to Mr. Bakiyev , but later broke with the president .