However, Piar and Gregor MacGregor, a Scottish soldier of fortune, who had previously been active in New Granada, managed to escape with their forces into the interior of the country, defeating Morales at El Juncal in September 1816 before moving south to Guayana.