I have a middle earth like world, but without magic where all the intelligent races are variations of the human race.
Due to Orc expansion one Elvish city similar to Rivendell becomes too close to the border and most of the Elves start to live it for the safer cities on the interior. The few remaining Elves are forced to hire nearby gnomes to keep the maintenance of the city infrastructure going.
The Elves are taller then average humans ~190 cm, live longer ~120 years and are smarter ~160 IQ. They have lowest fertility rate and they are great fighters.
The Gnomes are much shorter ~90 cm, with shorter lifespan ~35 years and have an IQ ~80 IQ. They have highest fertility rate and they avoid fighting unless cornered or being forced to defend their offspring.
If the initial population of the Elvish city is around 20,000 and only about 1,000 remained will the city be able to function? There's more then enough Gnomes in the surrounding highlands willing to work for the remaining Elves, and Elves have enough treasury to pay them for the foreseeable future.
By function I mean being able to keep at least the most needed businesses open (bakery, blacksmith, fetcher, armorer, grocer etc), maintaining the water & sewage system, and most important of all fixing the defensive walls & towers.