Owing to Rákóczi's War of Independence (1703–1711), the position of Serbian militiamen in the Military Frontier of the Habsburg Monarchy was endangered. In 1704 the first Serbian attempts were made to offer their services to Imperial Russia in the latter's struggle against the Ottomans. Prior to the beginning of the Russo-Turkish War (1710–11) Russian Emperor Peter the Great invited Serbian militiamen and Serbs in general to join the Russian forces.