Be up a tree
(See: Be up against the wall)
Origin
Colloquial, early 1800s. In 1838, William Makepeace Thackeray wrote in
his Major Gahagan: "I had her in my power - up a tree, as the
Americans say,". This informal expression alludes to animals, such as
racoons or squirrels, that climb a tree to escape from attackers. The
same attackers then surround the tree, the little animals cannot come
down and are forced to stay "up the tree"