Barack Obama has urged Israelis and Palestinians to restrain themselves and put an end to acts of retribution.
In an article in an Israeli newspaper, Mr Obama calls it a “dangerous moment”.
He is lamenting both the murder of three Israeli teenagers and the killing of a Palestinian boy in what many suspect was revenge.
The president praises Palestinian President Mahmoud Abbas as committed to peace and security co-operation.
Mr Obama’s article comes as Israel launched an offensive against the Gaza Strip to quell rocket attacks threatening southern Israel.
The president says the US is still committed to peace despite the recent collapse of US-backed talks.