go to the wall
Lose a conflict, be defeated; also, yield. For example, In spite of their efforts, they went to the wall, or When it's a matter of family versus friends, friends must go to the wall. [Late 1500s]
Fail in business, go bankrupt. For example, First one branch and then another did poorly, and the store finally went to the wall. [First half of 1800s]
Take an extreme position, hold out to the end. For example, The President went to the wall to defend his choice to head the FBI. For a synonym, see go to the mat.