Morocco is the fourth state to make such a deal with Israel since August.
It joins the United Arab Emirates, Bahrain and Sudan in beginning to forge deals with Israel, driven in part by us -led efforts to present a united front against Iran and roll back Tehran's regional influence.
The Trump administration has been reaching out to Morocco for years.
Trump celebrated the achievement on Twitter, calling the deal an "historic breakthrough".
Trump, a staunch backer of Israel, tweeted: "Israel and the Kingdom of Morocco have agreed to full diplomatic relations - a massive breakthrough for peace in the Middle East!" During a September meeting with Israel Prime Minister Benjamin Netanyahu, Trump signaled that "five or six" more countries were eager to end hostilities with the Jewish nation.
Morocco shares Gulf Arabs' concerns about Iran, and in 2018 it severed diplomatic relations as it accused the clerical state of backing the Polisario, charges denied by Tehran.
In a statement, the palace in Rabat said the king had promised Trump he would facilitate direct flights to transport Jews of Moroccan origin and Israeli tourists to and from Morocco and re-open the liaison offices, which had been closed in 2002.
Trump also tweeted that he signed a proclamation recognizing Moroccan sovereignty over the Western Sahara. Morocco had claimed the vast desert area as its "southern provinces" since 1975 as the Polisario Front, based in southern Algeria, wants its independence. Since then it has been the subject of a long-running territorial dispute between Morocco and its indigenous Saharawi people, led by the Polisario Front.
Egypt's President Abdel-Fattah El-Sisi said on Thursday that he valued the Morocco-Israel normalisation agreement, describing it as an "important step" for achieving "more stability and regional cooperation".
A 16-year-long insurgency ended with a UN-brokered truce in 1991 and the promise of a referendum on independence, which has yet to take place.
Lotfi Bouchaara, Morocco's ambassador to Moscow, told the BBC's Focus on Africa programme that Morocco did not breach the ceasefire but that its military was responding to a provocation by Polisario fighters who had blocked a key road to Mauritania.
"We urge the parties to engage in discussions without delay, using Morocco's autonomy plan as the only framework to negotiate a mutually acceptable solution", it said.
Fighting occasionally flares up, most recently a month ago when the Moroccan military launched an operation in the United Nations -patrolled Guerguerat border zone to clear a road it said was blocked by Polisario supporters.
President-elect Joe Biden, due to succeed Trump on January 20, will face a decision whether to accept the US deal on the Western Sahara, which no other Western nation has done.
It would also not change "the determination of the Sahrawis under the leadership of the Polisario Front to carry on with their struggle", Bechraya added.