CAIRO — Vice President Mike Pence and the Egyptian leader Abdel Fattah el-Sisi pledged a united front against terrorism in the Middle East as Mr. Pence, the highest-level American official to visit the United States ally in nearly a decade, began a trip through the region after leaving behind a government shutdown in Washington.

The meetings focused on security cooperation and economic ties between the two countries as well as efforts to fight the Islamic State. The vice president called it a “very productive” meeting and said he pressed Mr. Sisi to cut diplomatic ties with North Korea, urged him to respect religious diversity, and said the United States was committed to Israeli-Palestinian peace efforts.

Mr. Pence and Mr. Sisi met for two and a half hours at the presidential palace in Cairo. Mr. Pence pointed to President Trump’s efforts to forge stronger ties with Mr. Sisi in his first year in office, “after a time when our countries seemed to be drifting apart.”

Mr. Pence arrived in Cairo hours after Congress failed to reach agreement on a plan to avert a partial shutdown of the federal government. Mr. Pence went ahead with his four-day trip to the Middle East despite the political turmoil at home, citing national security and diplomatic reasons.