He nearly lost everything because of his drug addiction, but his friends helped to pull him back from 'the brink'.
The other team 'brought them to the brink of' defeat. [=came very close to defeating them]
an animal that has been 'brought/pulled back from the brink of' extinction
(..) What time is it? Not yet dawn. I dreamed I saw a great wave... ...climbing over green lands and above the hills. I stood upon the brink. It was utterly dark in the abyss before my feet. A light shone behind me... ...but I could not turn. I could only stand there, waiting. (..)2003 The Lord of the Rings: The Return of the King