NEW DELHI — India and Egypt have agreed to boost cooperation in security and anti-terror efforts, with their leaders on Friday calling terrorism one of the gravest threats their countries face.

Indian Prime Minister Narendra Modi and visiting Egyptian President Abdel-Fattah el-Sissi said they will cooperate more in defense and exchange more information that might help in rooting out radicals.

The two leaders “considered terrorism to be one of the gravest threats to international peace and security,” a joint statement said.

The Egyptian leader told a news conference that the two countries are “required” to bolster relations “due to the sizable threats and common challenges as we face, starting from the dangers of terror and extremism that entails concerted efforts at all levels, to issues of climate change and sustainable energy sources for future generation.”

The two sides also signed an agreement on maritime shipping cooperation and spoke of the importance of boosting bilateral trade, which in the past year reached $4.76 billion, making India Egypt’s sixth-largest trading partner.

President el-Sissi, accompanied by government ministers and business leaders, arrived Thursday night for a three-day visit during which he also met with U.S. Secretary of State John Kerry. No details of that meeting have been released.

Kerry had delayed his planned departure from the Indian capital on Thursday. The U.S. Embassy said he plans to join President Barack Obama in China for the weekend G-20 summit.