Quba is a city and the administrative centre of the Quba District of Azerbaijan. The city lies on the north-eastern slopes of Shahdag mountain, at an altitude of 600 metres above sea level, on the right bank of the Kudyal river. It has a population of 38,100.