At the very time of the construction of the San Joaquin Church in 1859-60, the Spanish were involved in a colonial war in North Africa to protect Spanish territories in Morocco. The decisive battle was waged at Tetuan (or Tétouan), Morocco and resulted in a decisive Spanish victory when Tetuan fell on February 6, 1861.
Subsequently Spanish general Leopoldo O'Donnell returned with his forces to Spain; they camped at spot north of Madrid while a triumphal entry into the capital was arranged. The camp, which acquired permanent structures as well as shops over time, became the Madrid neighborhood known as Tetuán de las Victorias. O’Donnell acquired the noble title of "First Duke of Tetuán."
For the Spanish, this was a heady victory in the centuries-old and bitter struggles between Catholic Spain over their Moorish adversaries. For the Muslims of North Africa it must have been another bitter humiliation, one that combined with all the rest, may still be an open wound.
It's amazing that news of the victory came to the friars building the new church in remote San Joaquin, Iloilo in the Philippines and that the friars instructed the stone carvers to celebrate the victory with bas relief carving of Tetuan battle scenes on the church facade. As others have pointed out the facial features of the Spanish and Moroccan combatants have a Chinese appearance. This should not be a surprise. Studies have shown that most of the stone masons working in the Visayas were Chinese. The San Joaquin carvings provide some fascinating physical substantiation of this.
Bear in mind that at the time the Moro slavers were still a real threat to the inhabitants of coastal Iloilo communities. It's no wonder that the victory at Tetuan resonated so strongly in the Philippines. Is it possible that the Tetuan bas relief was really done after the church was completed?