"We affirm that Israel has a right to defend itself. We have been consistently clear that Iran can never have a nuclear weapon," the statement read.
The agreement on the statement was reached on Monday evening, shortly after the White House announced that US President Donald Trump would leave the meeting early amid the escalating conflict between Israel and Iran.
The statement called Iran "the principal source of regional instability and terror" and said the leaders hoped for a "broader de-escalation of hostilities in the Middle East, including a ceasefire in Gaza."
The statement also said that the G7 would continue to monitor international energy markets closely and is prepared to take coordinated measures "with like-minded partners, to safeguard market stability."