China’s President Xi Jinping has condemned the killing of a Chinese hostage by Islamic State extremists as Beijing confirmed for the first time on Thursday the identity of the mainland captive as Fan Jinghui.

The Islamic State group said on Wednesday that it had killed Fan and Norwegian captive Ole Johan Grimsgaard-Ofstad after earlier demanding ransoms for the two men.

“Terrorism is a universal enemy of mankind,” Xi said on Thursday morning.

“China condemns all types of terrorism and will fight against any violent terrorism attacks that challenge human civilisation.”

Xi also said he had sent his condolences to Fan’s family in a statement issued in Manila, where he is attending the Asia-Pacific Economic Cooperation summit.

Earlier on Thursday China’s ministry of foreign affairs had confirmed the identity of the Chinese hostage as Fan, who was put “up for sale”, along with Grimsgaard-Ofstad, by the extremist group in early September.

The Chinese ministry’s spokesman Hong Lei said the government had tried to save Fan after he was kidnapped by the extremists, but “the terrorism group ignored human conscience and morals”.

Hong said: “The Chinese government will do all it can to bring the killers to justice.

“We will continue working with the international community on counterterrorism in pursuit of maintaining world peace.”

The extremist group published two images of the men in the second-to-last page of its English-language magazine, saying they had been “executed after being abandoned by kafir nations and organisations”. “Kafir” is the Arabic word for infidel.

In the images, the men both appeared to have both been shot to death.

Norway’s Prime Minister Erna Solberg told a news conference in Oslo that Grimsgaard-Ofstad, had most likely been killed.

“We condemn the killing,” Solberg said.

The deaths of the two men come days after 129 people were killed in Paris in the worst ever militant attacks on French soil, and as Moscow launched fresh air raids against IS in Syria after confirming a “terrorist attack” brought down a Russian passenger jet in Egypt last month.

The extremist group had earlier identified the Norwegian hostage as Grimsgaard-Ofstad, 48, from Oslo, and the Chinese man as Fan, 50, a freelance consultant from Beijing. It did not say when or where the two were captured.

The Islamic State group controls large areas in Iraq and Syria. The killing of the two men stood in contrast to other filmed beheadings and atrocities carried out by the group since seizing a third of Iraq in a lightning advance in 2014.

The demand for a cash ransom also stood in contrast to the group’s other hostage demands. The announced killings come as Islamic State militants face increasing airstrikes from a variety of countries, including the United States, Russia and France, as well as ground attacks from Kurdish and other forces.

In September, the Chinese foreign ministry confirmed that the Chinese national reported as being held hostage by Islamic State insurgents appeared to be one of its missing citizens.

State-run The Beijing News said it had located an advertising company in western Beijing registered to Fan using the partial address provided in the magazine.