Bonilla, who successfully defended his European title in Manchester earlier this year, was pushed all the way by Sweden fighter Uno Sanli, who led 5-4 after the first round.
But the Spaniard landed a winning score just seconds before the buzzer at the end of the regulation three rounds to record a 7-6 victory.
There was, though, no such problem for defending Olympic champion Wu Jingyu in the women's -49kg, as the Chinese fighter cruised past Elizabeth Zamora Gordillo of Guatemala 10-2. She will fight Japan's Erika Kasahara this afternoon for a place in tonight's semi-finals.
A new scoring system is being used for the first time in Olympic competition, and both fighters in the contest between Mexico's Diego Garcia de Leon and Safwan Khalil of Australia used the appeals process, with scores being removed on video review.
Khalil, the number eight seed, went on to close out a 9-4 victory after a strong third round to set up a clash with Bonilla in the quarter-finals.
There was a shock when Dominican fighter Yulis Mercedes Reyes, the silver medallist from Beijing, was beaten 8-3 by Yemen wild card Tameem Al-Kubati.
Third seed Pen-Ek Karaket of Thailand also failed to progress to the quarter-finals, beaten on a sudden death score by Lee Daehoon.
Second seed Wei Chen-Yang from Taipei is, though, safely into the last eight after he beat Le Huynh Chau of Vietnam 5-1, and will now take on Russian Alexey Denisenko.
Compatriot Yang Shu-Chun, world silver medallist in 2011, progressed in the women's competition with a comprehensive 9-3 win over German Sumeyye Manz, the world bronze medallist. She will fight Chanatip Sonkham, the seventh seed from Thailand.
Spanish third seed Brigitte Yague Enrique, the three-time world champion who missed a shot at gold in Beijing because of injury, progressed to the last eight when she dispatched Carolena Carstens Salceda of Panama 7-2.
The repechage offers the chance of redemption later for anyone defeated in the preliminaries, should their opponent go on to make the finals.
Related content
- Athletes
- Sports
- Countries


