Off-grid technologies are increasingly being proposed as a way of ensuring cost efficient universal access to electricity in many developing countries. However, many un-electrified communities would prefer access to electricity via the national grid rather than off-grid technologies. Electricity planning based on cost efficiency alone could therefore be undermined by political pressure from discontented communities that are assigned off-grid technologies. Using a case study of un-electrified communities in Ghana, we develop an electricity planning algorithm based on hierarchical lexicographic programming and consider specifications where the priorities are adjusted to give weight to 1) cost efficiency and 2) political economy considerations so that communities with larger populations (and therefore votes) are given priority in terms of grid electrification. The results emphasise the need to incorporate the political economy considerations in the national planning of universal electrification, showing significant regional differences in terms of where grid extensions ought to be placed. Incorporating a political economy perspective in national planning also suggests that the most important policy trade-offs shift from considering the grid versus offgrid balance to focussing more on the effectiveness of grid investment in providing universal access.