Iran said it had not violated the ceasefire. The armed forces general staff denied there had been any launch of missiles towards Israel in recent hours, Iran's Nour News reported.
The developments on Tuesday raised early doubts about the ceasefire, intended to end 12 days of war.
Defence Minister Israel Katz said in a statement he had ordered Israel's military to "continue high-intensity operations targeting regime assets and terror infrastructure in Tehran" in light of "Iran's blatant violation of the ceasefire declared by the President of the United States".
Trump told reporters at the White House before departing for a NATO summit that in his view, both sides had violated the nascent agreement he had announced earlier.
"They violated it but Israel violated it too," Trump said. "I'm not happy with Israel."
On social media, he called on Israel to stop dropping bombs and bring its pilots home.
Both Israel and Iran had confirmed the ceasefire after Trump's announcement.
Israeli Prime Minister Benjamin Netanyahu said his country had achieved the goals it set in launching its June 13 surprise attack on Iran - to destroy its nuclear program and missile capabilities.
Iran's top security body, the Supreme National Security Council, said its military had forced Israel to "unilaterally accept defeat and accept a ceasefire", and it was ready to respond to any further aggression.
In the last reported strikes before the ceasefire, missiles killed four people in the southern Israeli city of Beersheba, the Israeli ambulance service said.
Iranian officials said nine people including a nuclear scientist were killed in a strike on a residential building in northern Iran.
Despite the early threats to the ceasefire, the response across the region and wider world was largely one of relief at the prospect of an end to the biggest direct confrontation ever between the two foes.
Israel attacked on June 13, hitting Iranian nuclear sites and killing the top echelon of its military command in the worst threat faced by the Islamic Republic since war with Iraq in the 1980s.
During the campaign, Israel said it was prepared to topple Iran's clerical rulers if necessary to achieve its aims and struck symbolic targets unrelated to the military, culminating on Monday with a strike on Tehran's Evin prison.
Iranian officials say hundreds of people have been killed in air strikes, but full information about the extent of the damage cannot be confirmed independently, with media tightly controlled.
Iran's retaliatory missile strikes killed 28 people in Israel, the first time large numbers of Iranian missiles have penetrated its defences.
Trump entered the war on Saturday with strikes on Iranian nuclear sites buried under a mountain using huge bombs that Israel does not possess.
A senior White House official said Trump had brokered the ceasefire deal in a call with Netanyahu, and Israel had agreed so long as Iran did not launch further attacks.
Qatari Prime Minister Sheikh Mohammed bin Abdulrahman Al Thani secured Tehran's agreement during a call with Iranian officials, an official briefed on the negotiations told Reuters.
US Vice-President JD Vance, Secretary of State Marco Rubio and US special envoy Steve Witkoff were in direct and indirect contact with the Iranians, a White House official said.
Iran had responded to the US participation in the air strikes by firing missiles on Monday at the biggest US military base in the Middle East, in Qatar.
No one was hurt in that strike, with Iran's retaliation apparently calibrated to allow de-escalation afterwards.
The US had been negotiating with Iran to agree curbs to its nuclear program after Trump quit a previous agreement in 2018.
Iran has always said its nuclear program is peaceful.
with AP and PA