The United States , Russia , the United Nations and the European Union , which cooperate in the so-called quartet for Middle East peace , agreed last month to demand that Hamas recognize Israel , end terrorist attacks and accept previous diplomatic agreements between Israel and the Palestinians .