CAIRO — Secretary of State John Kerry told Egyptian officials on Sunday that they would not be able to defeat terrorism at home unless they showed greater respect for human rights.

“The success of our fight against terrorism depends on building trust between the authorities and the public,” Mr. Kerry said at a news conference with his Egyptian counterpart, Sameh Shoukry. “If that possibility does not exist, then, regrettably, more misguided people will be driven to violence and there will be more attacks.”

But with the United States worried about militants in Sinai and Libya who have pledged allegiance to the Islamic State, American officials also signaled that they would not let their concerns with human rights stand in the way of increased security cooperation with Egypt.

Mr. Kerry said the United States was moving toward resuming “Bright Star,” the joint military exercise President Obama suspended in August 2013 after Egypt’s generals cracked down on supporters of Mohamed Morsi, the president they ousted from power.