I attacked a city with my sovereign, fought a battle with 2 units, and took the city. The next turn an enemy stack suddenly appeared right on top of the city, with my sovereign still in the city:

I moved my sovereign out of the city and attacked the stack, which turned out to not be a stack, but 5 individual units that I had to attack one at a time.