Prime Minister Shinzo Abe and Jordanian King Abdullah II on Sunday agreed to work together to counter Islamic State group militants that have become a threat to international society, Japanese officials said.

"Extremist moves in the world must be stopped. Japan is ready to extend nonmilitary assistance," Abe said during summit talks in the Jordanian capital, Amman, according to the Japanese officials.

Abe said Japan will be able to contribute more to U.N. peacekeeping operations and other activities in the future, referring to his government's current legislative reform efforts to permit Japan to engage in collective self-defense.

He also said that Japan will provide ¥14.7 billion to help Jordan, which is struggling financially due to its efforts to support refugees fleeing from Syria and Iraq.

The assistance consists of ¥12 billion in yen loans and ¥2.7 billion in contributions to international organizations providing medical assistance and supplies to refugee camps.

Ahead of his visit to Jordan, Abe said in Egypt that Japan will provide about ¥294 billion to help stabilize the Middle East. The financial assistance to Jordan is part of that amount.

Abe is currently on a six-day trip to the Middle East, which will also take him to Israel and the Palestinian territories. It is the first time in about nine years for a Japanese prime minister to visit Jordan, Israel and the Palestinian territories.

According to the Foreign Ministry in Tokyo, Jordan is seeing its financial burden rise partly because of accepting more than 600,000 Syrian refugees fleeing the ongoing civil war there.