JERUSALEM — President Trump said Thursday that he would release his long-awaited Middle East peace plan within days and invited Prime Minister Benjamin Netanyahu of Israel and his rival, the former army chief Benny Gantz, to the White House next week to discuss it.

Neither the plan nor the visit may do much to advance the cause of peace, but the occasion promises to be a surreal spectacle.

If all goes according to plan, Mr. Trump, who is on trial in the Senate on charges of high crimes and misdemeanors, will play host to Mr. Netanyahu, who has been indicted on equally high charges of bribery, fraud and breach of trust, and to his challenger, Mr. Gantz, who holds no government office and whose main argument to oust Mr. Netanyahu is that he has not been indicted for anything.

The meeting will take both men away from Israel on the day that its Parliament is scheduled to begin debating whether to grant Mr. Netanyahu immunity.