 The Ottomans seemed ready to grant Serbia autonomy following rebel victories in 1805 and 1806, also pressured by the Russians, who had taken Moldavia and Wallachia; they agreed to a sort of autonomy and clearer stipulation of taxes in January 1807, by which time the rebels had already taken Belgrade.The rebels rejected the treaty and sought Russian aid to their independence, while the Ottomans had declared war on Russia in December 1806.A Russian-Serbian alliance treaty was signed on 10 June 1807.