With Bosnia leading 1-0, both Kyriakos Papadopoulos and Dzeko were sent off for violent conduct by the corner flag.
It started with Sokratis Papastathopoulos seemingly getting a little close to Dzeko, who had already been booked, while trying to close the striker down, grabbing him by the midriff.
Dzeko hit the deck and held on to the leg and shorts of Sokratis before pulling them down to reveal the Greece player's undergarments.
This sparked a melee of pushing and shoving among other players. Papadopoulos got involved and earned a straight red while Dzeko picked up a second booking and marched off the field with blood coming from a cut near his ear.
The game continued its dramatic theme when Greece snatched a late, late equaliser to deny Bosnia who took the lead through a Orestis Karnezis own goal in the first half.