This image made from a video released Feb. 15 by militants in Libya purportedly shows Egyptian Coptic Christians in orange jumpsuits being led by masked militants. The video later appears to show the militants killing the Egyptians. (AP)

The Islamic State in Libya released a video Sunday that appeared to show the beheading of 21 Egyptian Christians who had recently been taken hostage there.

In the video, Islamic State fighters marched the Egyptians onto a stretch of coastline before forcing them to kneel and severing their heads. The brutal murders were portrayed as retaliation against what a masked fighter described as “the hostile Egyptian church.” Coptic Christians make up about 10 percent of the Egyptian population and suffer widespread discrimination and persecution.

In a televised speech following the killings, Egyptian President Abdel Fattah al-Sissi announced that he was banning all Egyptians from entering Libya and that Egypt reserved the right to respond to the murders, which he called an “abhorrent act of terrorism.”

The footage — titled “A Message Signed with Blood to the Nation of the Cross” — was the first propaganda video from the Libyan branch of the Islamic State, which in Iraq and Syria has declared a caliphate over a wide swath of territory under its rule.

In two incidents, 21 Egyptian Copts were kidnapped in the coastal city of Sirte in December and January. The Coptic Church in Egypt announced Sunday that it had identified the men in the video as the missing Egyptians.

The White House condemned the killings in a statement late Sunday, calling them “despicable and cowardly.”

“We offer our condolences to the families of the victims and our support to the Egyptian government and people as they grieve for their fellow citizens,” the statement said. “ISIL’s barbarity knows no bounds.”

It added: “This heinous act once again underscores the urgent need for a political resolution to the conflict in Libya, the continuation of which only benefits terrorist groups, including ISIL. We call on all Libyans to strongly reject this and all acts of terrorism and to unite in the face of this shared and growing threat.”

In Libya, at least three groups have announced their allegiance to the Islamic State in recent months. The Islamic State’s “Tripoli Province,” or Wilayat Tripoli, claimed responsibility for the deaths of the Christians. The Islamic State had previously posted pictures of the captives, including Friday, when the group published images of the hostages in orange jumpsuits in its monthly online magazine.

“Today we are south of Rome,” a militant wearing a brown ski mask said against a backdrop of gray storm clouds in the five-minute video. “We will conquer Rome with Allah’s permission.”

The hostages were on the sand in orange jumpsuits, similar to those worn by U.S. hostages slain by the Islamic State in Syria.

“The sea where Sheik Osama bin Laden’s body was hidden, we swear to Allah we will mix with your blood,” the militant said.

After the killings, the camera pans to waves red with the victims’ blood. Captions in the video refer to Kamilia Shehata, an Egyptian Coptic woman who in 2010 was rumored to have converted to Islam before police and the church clergy isolated her.

“Blood is what awaits you for what you did to Kamilia and her sisters,” the caption reads.

Before his address to the nation, Sissi called an emergency meeting with the National Defense Council, the country’s top security body, to discuss a possible response.

The Egyptian government has backed Libyan forces that are fighting Islamist militants in the country but has refrained from directly involving Egyptian troops. The military is battling its own Islamist insurgency in the restive Sinai Peninsula, where a local militant group also announced it had joined the Islamic State in November.

Analysts have warned of the growing extremist threat in Libya, which shares a 700-mile border with Egypt and has struggled to form a state after the collapse of the regime of Moammar Gaddafi in 2011.

The country is rife with armed militias vying for power and trying to pave the way for the rise of the Islamic State there, analysts say. Libyan militants have carried out attacks on Egyptian Christians living and working there, including the execution of seven Egyptians in Benghazi last year.

Safwat al-Zayyat, a retired general in Egypt’s army, said Sissi might respond militarily, directly intervening in Libya’s civil conflict.

The majority of the victims came from a cluster of villages in the southern Egyptian province of Minya, which is one of the most impoverished areas of Egypt.

Before the turmoil of the Arab Spring in 2011, more than a million Egyptians worked mainly as menial laborers in Libya. According to the Egyptian Commission for Rights and Freedoms, a local rights group, about 30 percent of Egyptians working in Libya are Christians.

Egypt’s Foreign Ministry was unavailable for comment Sunday.