President Francesco Cossiga asked outgoing Socialist Prime Minister Bettino Craxi today to try to form Italy's 45th postwar government to replace his coalition that collapsed last week in recriminations over the handling of the hijacking of the Italian cruise liner Achille Lauro.

Craxi, Italy's first Socialist prime minister since the end of World War II, had been forced to resign on Thursday after Defense Minister Giovanni Spadolini, a member of the Republican Party, pulled his faction's three ministers out of Craxi's 26-month-old five-party coalition government.

Spadolini took exception to the government's handling of a decision to allow Mohammed Abbas, a Palestinian official the United States accused of having masterminded the hijacking of the Achille Lauro, to leave Italy despite a U.S. extradition request.

President Reagan dispatched a special envoy to Rome to try and patch up relations between Washington and Rome.

Cossiga, after consultating with Italian political leaders, meanwhile asked Craxi to try to reconstuct the coalition government that had been one of the most long-lived since World War II.

"I will immediately start work to resolve the crisis, which does not lend itself to easy solutions," Craxi said in a talk with journalists outside the president's Quirinale Palace.

"The needs of the country endure crisis situations badly and endure prolonged crisis situations even worse, so I hope that the necessary clarifications and agreements to form a new government can be realized rapidly," he said.

Craxi immediately scheduled a round of meetings with the leaders of the country's three most important political parties -- the Christian Democrats, the nation's biggest party for the past 40 years; the Communist Party, the second-largest vote-getter in elections, and his own Socialist Party.

He plans to hold meetings with the leaders of the other important parties, Spadolini's Republicans, the Liberals and the Social Democrats, on Tuesday.

Craxi's success in forming a new government hinges on his ability to put together a coalition that would command a strong majority of non-Communist votes in Italy's 630-seat Parliament.

Four of the original five parties in his coalition formed in 1983, which had given him a comfortable 366-vote majority in the Parliament, openly have advocated a reconstitution of his previous government, the second-longest governing in postwar Italy.

Only the Republican Party, which commands 29 votes in Parliament, has been lukewarm over a new Craxi government.

But even the Republicans, in their discussions over the weekend with Cossiga, did not rule out the prospects, or desirability, of forming a new government led by Craxi, given the fact that almost any other formula for forming a coalition would imply the sort of debilitating instability that for so long plagued Italian governments.

The formation of a new government depends very much on the relations between Craxi and Spadolini, a former prime minister whom Craxi replaced in 1983 and who, Italian political sources say, never forgave Craxi for taking power.

Spadolini brought down the government last week over Craxi's handling of the hijacking two weeks ago of the Achille Lauro and the government's unwillingness to follow U.S. demands to prosecute Abbas, who Washington charged was the mastermind of the hijacking.

Officials of the Craxi government and Italian magistrates ruled that there was insufficient evidence presented to Italian courts to substantiate U.S. demands for extradition of Abbas, and he was allowed to leave the country for Yugoslavia.

Abbas and the four hijackers were forcibly brought to Italy on Oct. 11, when U.S. Navy jets intercepted an officially chartered Egyptian commercial jet that had sought to fly the hijackers from Cairo to Tunisia after they had surrendered following mediation by Abbas, the leader of a faction of the Palestine Liberation Front.

A letter from Reagan to Craxi, delivered by Deputy Secretary of State John C. Whitehead on Saturday, however, seems to have defused the confrontation between Rome and Washington and set the stage for a renewal of traditionally close and friendly relations between the two nations.

Following the "Dear Bettino" letter from Reagan that Whitehead delivered, Craxi agreed that, despite his earlier reservations, he would fly to the United States this week for a meeting of Western European leaders with Reagan in preparation for the U.S. president's meeting in Geneva next month with Soviet Communist Party leader Mikhail Gorbachev.