Netanyahu was indicted in 2019 in Israel on charges of bribery, fraud and breach of trust - all of which Netanyahu denies. The trial began in 2020 and involves three criminal cases. He has pleaded not guilty.
"Bibi Netanyahu's trial should be CANCELLED, IMMEDIATELY, or a Pardon given to a Great Hero, who has done so much for the State (of Israel)," Trump wrote on Truth Social on Wednesday, adding he had learned that Netanyahu was due to appear in court on Monday.
Israel's opposition leader Yair Lapid said Trump should keep out of the matter. "With all due respect and gratitude to the president of the United States, he's not supposed to intervene in a legal process of an independent state," Lapid said.
"I hope and suppose that this is a reward he (Trump) is giving him (Netanyahu) because he is planning to pressure him on Gaza and force, to force him into a hostage deal that will end the war," Lapid told Israeli news website Ynet.
Trump extolled Netanyahu as a "warrior" but also said in his post: "It was the United States of America that saved Israel, and now it is going to be the United States of America that saves Bibi Netanyahu."
That appeared to be a reference to US involvement and support for Israeli strikes on Iran's nuclear program.
It was unclear if Trump meant the US could do anything to aid Netanyahu in his legal battle.
The Republican president described the case against the Israeli leader as a "witch hunt", a term Trump has frequently applied to US attempts to prosecute him and the same term Netanyahu has used to describe his own long-running trial.
The warm words contrasted with the rare rebuke he issued on Tuesday over Israel's post-ceasefire strikes on Iran.