On a post on Truth Social, he said that Israel had accepted his terms, and it was "time for Hamas to accept them as well".
1news.media reports, citing BBC, the president wrote that "this is my last warning, there will not be another one!"
Hamas responded in a statement and said it was ready to "immediately sit at the negotiating table" following "some ideas from the American side aimed at reaching a ceasefire agreement".
Trump also told reporters that there would be "a deal on Gaza very soon" and he thought that all the hostages would be returned, dead or alive.
Of the 48 hostages still being held in Gaza, as many as 20 are believed to be alive.