RAMALLAH, West Bank — Palestinian factions Hamas and Fatah signed a declaration in Beijing on ending a yearslong rift, the groups said Tuesday, taking a step toward resolving a deep divide which has lingered for years despite repeated attempts at unifying the sides. [time-brightcove not-tgx=”true”] The two heavyweights of Palestinian politics signed the Beijing Declaration on “ending division and strengthening Palestinian unity,” according to Chinese state broadcaster CCTV, pledging to form a unity government for the Palestinian territories.