he Israeli government warned Egyptian President Hosni Mubarak today that if he refuses to include Jerusalem in his planned visit to Israel, the visit will be canceled.

The blunt warning was contained in a statement approved by Prime Minister Menachem Begin and his Cabinet after Foreign Minister Yitzhak Shamir briefed the ministers on his visit to Cairo last week, during which Shamir met with the Egyptian leader.

The condition threw into doubt the question of whether Mubarak, who repeatedly has refused to commit himself to a specific date for his first visit to Israel, would come at all. Israeli officials had first mentioned mid-February for the visit, but recently they have talked about "sometime in March."

There was no immediate Egyptian reaction to the Israeli Cabinet action. Earlier today, Egyptian Foreign Minister Kamal Hassan Ali said that the whole question of Mubarak's visit was still under discussion.

The Israeli Cabinet statement, read to reporters by Cabinet Secretary Aryeh Naor, said, "If President Mubarak refuses to include Jerusalem during the course of his visit to Israel, we would have to do without this important visit."

Naor would not say whether Begin or Shamir had been advised by the Egyptians that Mubarak would not come to Jerusalem, but an informed source in the government said that the Egyptians "have said they would prefer to come to other places, but they have never said they would not come to Jerusalem."

The official source said that Mubarak made it clear during his talks in Cairo that he would prefer a working visit, as opposed to an official state visit, and that he would prefer visiting Tel Aviv or another major city so as not to unnecessarily draw attention to himself and exacerbate criticism from the rest of the Arab world.

But Israeli officials denied that during his visit Shamir gave Mubarak a note from Begin saying that if the Egyptian leader was unwilling to visit Jerusalem, he should stay away.

"There were discussions through diplomatic channels, but there was not such an exchange of notes," the official said in response to an Israeli radio report citing such an ultimatum.

Begin is understood to regard a Mubarak trip that excludes Jerusalem as a potential slight to him and a denigration of the Camp David accords, which began to take shape as a result of the late president Anwar Sadat's historic visit to Jerusalem in November 1977. Moreover, Begin is said to feel that such an exclusion would symbolically undermine the importance of Jerusalem as the capital of Israel.

After his 1977 visit, Sadat's trips to Israel included Haifa and Beersheba, but not Jerusalem. Begin's aides said that was not considered important at the time, because the Egyptian leader had already visited the capital.

There has been speculation here that Mubarak has been intentionally delaying his visit out of fear of being embarrassed in a way that Sadat was when the Israeli Air Force bombed Iraq's nuclear reactor two days after his summit with Begin in Sharm el-Sheik last June.

Amid reports of a possible Israeli air strike against Palestinian guerrilla positions in southern Lebanon, Mubarak was said to be concerned that such a strike during or immediately after a visit would create the impression of collusion.

Washington Post correspondent David B. Ottaway reported from Cairo:

Egypt feels that a visit by Mubarak to Jerusalem would be an implicit recognition that it accepts that city as the capital of Israel. Egyptians note that when Sadat visited Jerusalem, the Arab portion, captured by Israel in l967, had not yet been officially annexed as part of Israel. That annexation led to a breakdown of the Palestinian autonomy talks.

Meanwhile, there was still no indication of the contents of a message Mubarak sent today to President Reagan. The message, described by Egyptian sources as "urgent," is being carried by Ashraf Ghorbal, the Egyptian ambassador to the United States, who reportedly cut short a visit to Cairo to deliver the message.

Foreign Ministry officials in Cairo told Reuter only that the message dealt with Palestinian autonomy issues and the Middle East peace process.