Ivory Coast beat Cameroon 2-1 in their World Cup qualifier at the Olympic Stadium Of Ebimpé on Monday evening.
The home side took the lead in the 20th minute, with Sebastien Haller converting from the penalty spot.
Haller then hit the back of the net once again nine minutes to double his side's lead.
But Cameroon got a lifeline 15 minutes into the second half when they were given a spot-kick themselves.
Bailly is a decent defender. But he is prone to some disastrous errors on the football pitch.
And he made another as he channeled his inner Bruce Lee.
With the ball in the air Bailly, instead of challenging for the ball with his head, decided it would be wise to go with his foot.
The end result was him raising his foot some seven feet off the floor and kicking Karl Toko Ekambi in the head. The Cameroonian held his head in pain and the referee had no choice but to give the away side a penalty.
Watch the moment below:
What was Bailly thinking?!
Nicolas Moumi Ngamaleu converted the resulting spot-kick to halve the deficit and make the final half-an-hour interesting.
Fortunately for Bailly, his mistake did not prove costly.
He made amends for his error as he helped his side hold on to a 2-1 victory and all three points.
The Football Terrace: Ranking the best and worst football transfers this summer! How did your team do?
That win means Ivory Coast have taken six points from their opening two World Cup qualifying games and sit top of Group E.
Cameroon, meanwhile, are three points worse off in second.
Ivory Coast are next in action in October when they play Malawi twice in the space of five days.