On 26 June 1723, after a long siege, Baku surrendered to the Russians and the Safavids were forced to cede the city alongside many other of their Caucasian territories. In accordance with Peter the Great's decree, the soldiers of two regiments (2,382 people) were left in the Baku garrison under the command of Prince Baryatyanski, the commandant of the city. Peter the Great, while equipping a new military expedition commanded by General Mikhail Matyushkin, charged him with sending more oil from Baku to St. Petersburg, "which is a basis of an eternal and sacred flame"—Old Russian: "коя является основой вечного и священного пламени". However, due to Peter's death, this order was not carried out.