Two men examine a fallen rocket half-buried in the ground on the outskirts of Jericho on June 8, following Iranian and Iran-backed Houthi rebel attacks. AFP-Yonhap

TEHRAN — Iran on Monday said it was ending its latest military operation against Israel after the first exchanges of fire between the foes since a shaky ceasefire began, but warned it could inflict a more "crushing" response.

U.S. President Donald Trump earlier on Monday told both Iran and key ally Israel to stop fighting, against the background of reports of an increasingly testy relationship between the U.S. leader and Israeli Prime Minister Benjamin Netanyahu.

Iran fired dozens of missiles at Israel overnight and Israel responded by targeting military sites in the Islamic republic, sparking fears the escalation could usher in a new full-scale conflict after the April 8 truce.

"Israel and Iran must immediately stop 'shooting.' President DONALD J. TRUMP," the U.S. leader wrote on his Truth Social network.