Kyrgyzstan's parliament adopted a new constitution on Wednesday reducing the president's powers, defusing a political crisis that had threatened the Central Asian state's fragile stability, according to Reuters. The country's political opposition, which had staged seven days of protests calling on the president to quit if he would not cede to their demands, hailed the vote as a victory. About 500 opposition supporters who remained on a central square for the vote shortly before midnight whistled, shouted and waved Kyrgyz national flags. "This is our victory, we won," said driver Baktybek Kalybayev. "It's our day, it's democracy." The protests were sparked by accusations that Bakiyev had gone back on promises to introduce democratic reforms when voted into office last year in the wake of violent protests that prompted his long-serving predecessor to flee the country. The United States and Russia both have military airbases in Kyrgyzstan. A mountainous former Soviet republic, it borders Kazakhstan, an oil-producing state where Western companies have invested billions of dollars. The parliament vote was passed in two quick successive readings by all 67 members present in the 75-seat chamber. The house erupted in cheers of "hurrah" after the votes and the national anthem played out over loudspeakers. State Secretary Adakhan Madumarov said before the vote that Bakiyev would sign the new constitution -- the final legislative step -- without delay if parliament passed it. Wednesday's deal came after a day of wrangling over details of the new constitution. Tension was high following a brief clash on Tuesday between the opposition protesters and a smaller group of Bakiyev supporters that was broken up by riot police using tear gas. Though it has few energy resources of its own, Kyrgyzstan is part of a Central Asia region rich in oil, gas and uranium where Beijing, Moscow and Washington are all jostling for influence. Bakiyev's 16-month rule has been fragile from the outset, raising the possibility he could suffer a similar fate to his predecessor, Askar Akayev, if protests continued. The opposition says the new constitution is a reasonable compromise that should end the political standoff. "The members of this parliament have shown the political will to come to a consensus for the sake of peace in the country," opposition legislator Kanybek Imanaliyev said before the vote. The deal removes the president's right to dissolve parliament and appoint the prime minister, who will instead be nominated by the party winning most votes in elections.