Josefa MacGregor died at Burghmuirhead, near Edinburgh, on 4 May 1838. MacGregor almost immediately left for Venezuela, where he resettled in Caracas and in October 1838 applied for citizenship and restoration to his former rank in the Venezuelan Army, with back pay and a pension. He stressed his travails on Venezuela's behalf two decades earlier and asserted that Bolívar, who had died in 1830, had effectively deported him; he described several unsuccessful requests to return and being to] remain outside the Republic ... by causes and obstacles out of my control" while losing his wife, two children and "the best years of my life and all my fortune".