United States Senator John Kerry visited the Hamas-ruled Gaza Strip on Thursday as part of a rare trip by American politicians to the area.

The former Democratic presidential nominee said he was in Gaza to see the aftermath of Israel's military offensive there last month. He did not meet with anyone from Hamas, which the U.S. considers a terrorist group.

Kerry said his visit did not signal any change in American Mideast policy. He told residents that Hamas must take moves toward peace and halt its rocket attacks on southern Israel.

Kerry was joined by an armed United Nations convoy. He inspected the ruins of a school destroyed in the Israel Defense Forces offensive and toured a neighborhood in northern Gaza that was heavily damaged in the fighting.

Earlier Thursday, two Democratic congressmen traveled separately to Gaza, the first congressional delegation to enter the area since Hamas took power nearly two years ago.

The Democratic congressmen, Brian Baird of Washington and Keith Ellison of Minnesota, were in Gaza early Thursday, the U.S. consulate said.

Consulate spokeswoman Micaela Schweitzer-Bluhm said the lawmakers would meet with United Nations officials. There were no plans to meet with Hamas.

Visits by U.S. officials to Gaza have been rare since Palestinian militants blew up an American diplomatic convoy in October 2003, killing three people, and no American representatives have gone since Hamas won Palestinian elections in 2006. The group violently seized control of Gaza the following year.

Since taking office last month, President Barack Obama has repeatedly said he hopes to improve U.S. relations with the Muslim world. As the first Muslim member of Congress, Ellison could play a key role in that mission. He could not immediately be reached for comment.

The three-week operation IDF operation in Gaza, launched to end years of Palestinian rocket attacks, killed some 1,300 Palestinians, according to Gaza officials. 13 Israelis were also killed in the hostilities.

Several UN facilities, including a large warehouse at the organization's Gaza headquarters, were heavily damaged. The UN has been trying to raise emergency funds to meet what it says are dire humanitarian needs in Gaza following the offensive.

Israeli government spokesman Mark Regev said he had no knowledge of the lawmakers' Gaza visit.