In 1595 Zamoyski, persuaded by Moldavian refugees, decided to intervene. The Commonwealth forces (numbering ~7,000-8,000 soldiers) under hetman Jan Zamoyski crossed the Dniestr, defeated local opposition (while Transylvanian troops retreated to their own country) and Ottoman reinforcements, and set Ieremia Movilă on the Moldavian throne as a Commonwealth vassal. This was seen by many as a very dangerous step because the Ottomans were preparing to place their own candidate on the Moldavian throne. Zamoyski contacted grand vizier Sinan Pasha and negotiated with the Ottoman governor on the Black Sea island of Tyahyn (near the Dniepr river) and convinced them of his peaceful intentions and that he did not want to fight with the Ottoman Empire. However, the Khan of Crimea, Ğazı II Giray, reacted and entered Moldavia with about 20,000 men (but no cannons and few janissaries). Zamoyski fortified his camp near Cecora at Prut river, withstood a three-day siege (17–20 October), and managed to obtain an agreement with the Ottoman Empire that recognized Movilă as hospodar (Treaty of Cecora). Moldavia became the Commonwealth's vassal and paid tribute to Constantinople at the same time (this is known as condominium - territory under rule of two sovereign powers). Not satisfied with this, previous hospodar Ștefan Răzvan invaded Moldavia, but his troops were crushed by Zamoyski and Răzvan was impaled by Movilă.