The Palestinian Islamist group took control of Gaza in 2007 , after battling forces loyal to Palestinian President Mahmoud Abbas .