To have the (higher) upper hand

to have, or get, the better of another person or thing.

See also: Hand