the brink
the point in time when something very bad or very good is about to happenon the brink of (doing) something: She believed she was on the brink of discovering a cure for cancer.
bring someone to the brink of something: The crisis brought the two nations to the brink of war.
back from the brink of something: A late goal pulled the team back from the brink of defeat.