Hamas and Fatah agreed to form a government, the groups said on Tuesday. The agreement would bring together the two rivals, along with 12 other Palestinian political groups, to form a united government. That government would hold elections, and once elected, would lead Palestinians in the West Bank and the Gaza Strip.