Hamas has struggled to govern since taking office in March under the weight of U.S.-led sanctions imposed because of its refusal to recognise Israel, renounce violence and abide by interim peace deals.