It was first established as Yanran at Shanyu Tai, southwest of present-day Urat Middle Banner, the northern slope of Lang Shan. This was later shifted to Hanhai a short period before it was changed to Anbei. The seat of governance remained there until the year 687.