This is a statement in a fairy tale "Der Wind und Die Sonne":
Dann nahm er seinen Schal ab und steckte ihn sich unter den Arm.
What does the word ihn here refer to? Is it seinen Schal or er? I know the meaning
Then he took off his scarf and put it under his arm
but I'm confused on how to interpret the grammar here.