Federal officials said yesterday that the four Palestinian hijackers of an Italian cruise ship may be tried and sentenced to life imprisonment in the United States but added that this may be unnecessary if Italy prosecutes them.

The fate of the terrorists remained clouded in legal uncertainties, however, as experts pored over arcane provisions of international law, a new U.S. hostage-taking statute and the American extradition treaty with Italy. Some of these legal experts said the United States would have great difficulty in extraditing the hijackers from Italy and that it would be simpler and more effective to let the Italians try the four.

President Reagan raised the possibility that the hijackers could be tried in both countries, and the administration made a formal extradition request to Italy as a kind of insurance policy in case it is not satisfied with the Italian prosecution.

But experts noted that the United States has no legal way to charge the terrorists with the murder of ship passenger Leon Klinghoffer, 69, of New York City, while Italy is free to try them for both the murder and the piracy of the ship.

Justice Department spokesman Terry H. Eastland said the question of where the hijackers would be tried is "secondary . . . . Our concern is that justice be done, period. We have a very good working relationship with the Italians, and we have great confidence in them."

Some experts disputed the Justice Department's contention that an American trial for the hijackers, who were aboard an Egyptian airliner intercepted by U.S. Navy jet fighters, is a clear-cut legal matter.

"We simply have no law that applies," said Alfred P. Rubin, professor of international law at Tufts University's Fletcher School of Law and Diplomacy. "U.S. law does not apply on Italian ships on the high seas . . . . The United States doesn't rule the world, however much this administration would like it to."

Rubin accused administration officials of making "wild assertions" about the government's jurisdiction that are at variance with "160 years of precedents," dating to sea piracy cases in the 1820s. He said other countries could retaliate by passing laws that would subject Americans to foreign prosecution.

"Suppose you bring the case in Washington, and the judge disagrees with the Justice Department and the four hijackers are released," Rubin said. "Then what do we do? I think it would be an extremely risky venture."

But the administration stood by Assistant Attorney General Stephen S. Trott's statement Thursday night that he was "supremely confident" the hijackers could be tried here.

"Whether the suspects will eventually be tried in the United States, in Italy, or sequentially in both countries will depend on legal matters that are yet to be resolved," Eastland said. "At this point, all options are being preserved."

Presidential spokesman Larry Speakes said the Italian government has assured the White House that it will prosecute the hijackers. But he said that "if the matter is not disposed of legally in Italy, the United States will have an opportunity to try them."

Administration officials said the United States cannot charge the Palestinians with killing Klinghoffer because there is no "long-arm" U.S. statute dealing with murders abroad. But they said the hijackers can be tried under the "hostage-taking" section of the 1984 Comprehensive Crime Control Act, which carries a maximum penalty of life in prison.

Eastland said the law is relevant in this case because it covers incidents where "the offender or the person seized or detained is a national of the United States." The law also provides for U.S. jurisdiction if the offender is found in the United States or if the terrorists attempt to coerce the U.S. government.

"Both the case law of the United States and longstanding principles of international law permit a sovereign nation to extend the reach of its criminal laws beyond its territorial borders to protect its recognized national interests," Eastland said in a statement.

Michael Abbell, former director of the Justice Department's Office of International Affairs, said that "there's absolutely no question in my mind that the hijackers could be tried here if they were brought here." But he said the extradition request could be fraught with legal difficulties.

If the Palestinians are tried in Italy, Abbell said, it may be impossible to prosecute them here under a "double jeopardy" clause of the newly revised U.S.-Italian extradition treaty, which says a person cannot be prosecuted in both countries for the "same acts."

"The Italians certainly don't have to extradite to the United States," said W. Thomas Mallison, director of the international and comparative law program at George Washington University. "The government of Italy has primary jurisdiction . . . . I'd be astonished if the Italians did it. They're primarily in charge because the alleged crimes took place on an Italian-flag ship."

Mallison called the possibility of a dual prosecution "remote" and said the administration would be well advised to leave the case to the Italians because of their strong record in prosecuting terrorists.