HONOLULU (Reuters) - President Barack Obama on Saturday condemned separate “outrageous terrorist bombing attacks” in Egypt and Nigeria and said the United States was prepared to assist both countries in responding to them.

A bomb killed at least 17 people outside a church in the Egyptian city of Alexandria early on New Year’s Day and the Interior Ministry said a foreign-backed suicide bomber may have been responsible.

“The perpetrators of this attack were clearly targeting Christian worshipers, and have no respect for human life and dignity. They must be brought to justice for this barbaric and heinous act,” Obama, who is vacationing in Hawaii, said in a statement.

“We are continuing to gather information regarding this terrible event, and are prepared to offer any necessary assistance to the government of Egypt in responding to it.”

In Nigeria, a bomb at a crowded market in the country’s capital Abuja killed at least four people and injured more than a dozen during New Year’s Eve celebrations late on Friday.

President Goodluck Jonathan blamed the blast on an Islamist group that claimed responsibility for bombings on Christmas Eve in central Nigeria that killed at least 80 people.

“Killing innocent civilians who were simply gathering -- like so many people around the world -- to celebrate the beginning of a New Year further demonstrates the bankrupt vision of those who carry out these attacks, and we are similarly prepared to offer assistance to the government of Nigeria as it works to bring the perpetrators to justice,” Obama said.