Following the outbreak of the First Serbian Uprising (1804), in the Sanjak of Smederevo (modern Central Serbia), the "Jančić's Revolt" broke out in the Gradiška region against the Ottoman government in the Bosnia Eyalet, following the erosion of the economic, national and religious rights of Serbs. Hajduks also arrived from Serbia, and were especially active on the Kozara. Jovan Jančić Sarajlija organized the uprising with help from Metropolitan Benedikt Kraljević. The peasants took up arms on 23 September 1809, in the region of Gradiška, beginning from Mašići. The fighting began on 25 September, and on the same night, the Ottomans captured and executed Jančić. The rebels retreated to their villages, except those in Kozara and Motajica who continued, and offered strong resistance until their defeat in mid-October, after extensive looting and burning of villages by the Ottomans. Another revolt broke out in 1834, in Mašići.