The flame was then passed to 10 torchbearers who completed the 2.5km route.
The last torchbearer, European and four-time world kung-fu champion Rovshan Hashimov took to the stage and lit the flame.
The flame was then carried to a commemorative lamp that will remain on display in the city until the Closing Ceremony of the Games on June 28.
Local residents were treated to a video projection depicting the official capturing of the flame at Ateshgah.