Others preferred to remain within the city, huddling inside the temples.

huddling引导的分词短语在这里有哪些用途,充当什么成分?

Others preferred to remain within the city, huddling inside the temples.

划线部分是目前分词短语,作方法状语。具体说,是 to remain within the city 的方法状语。