The lack of patrolling by MacGregor's troops allowed the Spanish to march straight into Porto Bello early on 30 April 1819. MacGregor was still in bed when the Spaniards found his riflemen drilling in the main square and opened fire. Awoken by the noise, MacGregor threw his bed and blankets from the window onto the beach below and jumped out after them, then attempted to paddle out to his ships on a log. He passed out and would probably have drowned had he not been picked up and brought aboard the "Hero" by one of his naval officers. MacGregor would claim that on regaining consciousness he immediately raised his standard over the "Hero", then despatched runners to Rafter ordering him not to surrender. The version of events favoured by Sinclair is that Rafter received orders to this effect only after he had himself contacted MacGregor on the "Hero". Rafter, in the fort with 200 men, kept up a steady barrage and waited for his commander to fire on the royalists from the ships—but to the colonel's astonishment MacGregor instead ordered his fleet to turn about and made for the high seas. Abandoned, Colonel Rafter and the remnants of MacGregor's army had no choice but to surrender; most of the surviving officers and troops entered miserable existences in captivity. Rafter was ultimately shot with 11 other officers for conspiring to escape.