Yes, Hamas later recognized the office of Palestinian prime minister, and in March 2007 Hamas declared its readiness to share power in a unity government with Abbas. However, the talks on the unity government collapsed, and in June 2007 Hamas seized control of Gaza, expelling Fatah.
Unveiling Mahmoud Abbas: Test Your Knowledge on the President of Palestine