WASHINGTON (CNN) -- Islamic fundamentalist group Hamas passed Sen. John Kerry a letter for President Obama while Kerry visited Gaza on Thursday, senior State Department officials said.
Sen. John Kerry tours Gaza's ruins with U.N. officials Thursday, the day he reportedly got a letter from Hamas.
The letter for the president is in the hands of the U.S. Consulate in Jerusalem, the officials said Friday.
Kerry, the Democratic chairman of the Senate Foreign Relations Committee, toured the devastation in Gaza and met with officials from the U.N. Works Relief Agency, the main provider of humanitarian aid in Gaza.
Frederick Jones, the committee's communications director, told CNN at the end of Kerry's meeting with UNRWA chief Karen Abu Zayed that "she handed [Kerry] a letter addressed to the president of the United States along with other materials."
The U.S. considers Hamas a terrorist organization and has no contact with the organization.
Kerry, D-Massachusetts, first learned that the letter was included in the materials, Jones said, after he left Gaza for meetings in Israel, when reports began to emerge that he had a letter from Hamas. Watch Kerry tour the Gaza devastation »
Without elaborating, Abu Zayed told BBC radio that Hamas had handed over a letter.
Kerry's visit was part of a delegation including Reps. Brian Baird, D-Washington, and Keith Ellison, D-Minnesota, the first Muslim to serve in the U.S. Congress.
Although Kerry also visited Gaza separately from the two congressmen, according to an official who was traveling with the senator, none of the U.S. lawmakers visited representatives of Gaza's Hamas leadership.
The Gaza visit was the first by U.S. officials since Hamas seized control of the territory in 2007, effectively splitting the Palestinian government.
Jones said that because the letter was not addressed to Kerry but to Obama, the senator did not open it.
"Kerry turned the letter over to the consul general in Jerusalem this morning to handle through appropriate channels," Jones said Friday.
Fawzi Barhoum, a Gaza-based spokesman for Hamas, denied that the organization had sent a letter to Obama via the United Nations and Kerry, saying that if Hamas chose to speak with the American administration, this is not the method it would employ.
But senior State Department officials told CNN that after reviewing the letter, the consulate determined that it was indeed from Hamas. Consulate officials are discussing the matter with the State Department and White House.
Consulate spokeswoman Mica Schweitzer-Bloom would say only that Kerry handed consulate officials a letter for the president and "it will be handled by the appropriate channels."
Obama has not ruled out talks with Hamas but said the group must first renounce violence, recognize Israel and abide by previous agreements successive Palestinian governments have reached with the Israelis.