WASHINGTON, May 29 (Reuters) - Republican former presidential contender Nikki Haley wrote "Finish Them!" on an Israeli artillery shell during a recent visit to Israel, amid an ongoing assault on Gaza that has left tens of thousands dead in the past eight months.

An image of Haley crouched in front of pallets of shells, writing with a marker on one, was shared on social media by Danny Danon, an Israeli politician and former ambassador to the United Nations. A second image he shared showed Haley's signed message: "Finish them - America HEART Israel, Always."

Danon had accompanied Haley, a former U.S. ambassador to the United Nations when Donald Trump was president, during the visit this past weekend.

Haley was quickly criticized for the message by human rights groups.

"Conflict is no place for stunts. Conflict has rules. Civilians must be protected," Amnesty International said in a statement on Wednesday while reacting to Haley's act.

Israel's three-week-old offensive in Gaza's Rafah has prompted an outcry from global leaders after an airstrike on Sunday killed at least 45 people when a blaze ignited in a tent camp in a western district.

The World Court last week ordered Israel to immediately halt its military assault on Rafah, in a landmark emergency ruling in South Africa's case accusing Israel of genocide. Israel denies genocide allegations.

Kenneth Roth, a former Human Rights Watch executive director, said of Haley in a post on X on Tuesday night: "Why not just sign I favor Israeli war crimes."

Later on Wednesday, Haley posted on X: "Israel must do whatever is necessary to protect her people from evil," adding that Israel was fighting "enemies" of the United States.

Reuters could not reach Haley for comment immediately on Wednesday.

Haley has been a longstanding supporter of Israel, whose war in Gaza has come under mounting international criticism, divided U.S. lawmakers over the Biden administration's support and prompted protests at campuses across the United States.

The local Palestinian health ministry puts the death toll from the war at over 36,000. There is also widespread hunger in the narrow coastal enclave and nearly its entire 2.3 million population has been displaced.

Israel says it is acting in self-defense after the militant Palestinian group Hamas attacked Israel on Oct. 7, killing around 1,200 people and seizing more than 250 hostages, according to Israeli tallies.

Photo from Sky News