win an advantage over something/someone, thus gaining a position of power.
1. WITNESSES. - JEFF.IN V-25 N-6 53-0405E 126 044
And as the devil always does, when he thinks he's got the upper hand, brother, he really pushes it. … See how the devil does? When he thinks he's got the upper hand, he boasts, brags, and carries on.