ISLAMABAD, PAKISTAN, JAN. 5 -- Five Palestinians on trial for hijacking a Pan American airliner in Karachi more than a year ago declared in court today that they had seized the plane with the intention of blowing it up over Israel after securing the release of Palestinians from Israeli prisons.

On Sept. 5, 1986, hijackers held about 400 passengers on a New York-bound Boeing 747 hostage for 17 hours. At that point, gunfire and grenade explosions attributed by Pakistan and witnesses to the hijackers killed 21 and wounded 100. Several other passengers had been wounded at the outset of the takeover.

The defendants' lengthy statement, laced with sharp attacks on Pakistani President Mohammed Zia ul-Haq, sought to defend the action as justifiable because of what it termed the oppression of Palestinians at the hands of "Americans and Zionists."

The five said they had intended to release the passengers on the plane and that the incident had ended with heavy casualties only when Pakistani commandos stormed the aircraft.

The hijackers started firing when lights on the aircraft began to dim and then went out as a generator supplying power ran out of fuel. One Pakistani official first claimed that a commando unit had stormed the plane but others quickly backtracked, saying a unit had been on alert but that it was not near the aircraft when the hijackers panicked and opened fire.

Caspar W. Weinberger, then secretary of defense, cited intelligence reports indicating the five belonged to the Abu Nidal group.

The trial began more than a year after the Sept. 5 hijacking. The courtroom is in a prison at Adiyala, 25 miles from here.

Today's statement, read by the Pakistani lawyer of the accused, was their first substantive courtroom comment.

Coming against the backdrop of recent violent Palestinian protests in the Gaza Strip and West Bank, the statement seemed to be intended to link the fate of the Karachi hijackers to that of the demonstrators in the territories under Israeli occupation.

The statement, full of references to the Koran and the recent history of the Palestinians, rejected western norms of legal justice and sought to link growing Islamic fundamentalist sentiment with the cause of the Palestinians.

"We came to Pakistan to hijack an American airplane to instantly draw the whole world's attention towards Palestine," the statement said.

"Our aim was to hijack the plane, free all the hostages and take the plane to various countries to get the release of 1,500 Palestinian freedom fighters. Our aim was to fly the plane toward some sensitive strategic center of the Zionist enemy and to blow it up with us inside . . . .

"We wanted to destroy the sensitive strategic center of the Zionists through an American weapon -- the explosion of the American plane. By this we would have struck at American imperialism. We wanted to strike at both enemies with one weapon at one time."

The statement said that while in the aircraft at Karachi airport they were frustrated by the "delaying tactics" of Pakistani officials, who were "preparing for a commando action . . . They carried out their action when it was suitable for them," the statement continued. "They attacked the airplane without caring for the lives of the innocent passengers on board except the Americans. It was done only to please America, although many innocent passengers . . . were killed."

Most of those killed were Indians who had boarded the plane at Bombay, the plane's departure point. Two of the dead held U.S. citizenship.

In comments certain to add fuel to Pakistani political fires, the accused attempted to link President Zia with what they said were international conspiracies against the Palestinians.

The statement said Karachi was chosen as site of the hijacking because the "American presence in Pakistan has increased and acquired dangerous shape. We want to strike at the American interests and espionage dens of America."

The Palestinians said they believed "our Pakistani brothers" would help them and added that Pakistan was chosen "due to the policies of the present regime, which maintains close relations with the great Satan, America." They said the "pro-American policies of this regime are detrimental not only to the Pakistani nation but to the Palestinian nation also."

After the hijacking, Zia questioned at a press conference why they had chosen Pakistan when his government had done much to express its Islamic character and to support the Palestinian cause. He said the hijackers would bear the full brunt of Pakistani law, which calls for the death sentence.

The accused also lumped Pakistan with Jordan, Lebanon and Egypt as "Arab and Moslem" nations that they said were acting against the interests of the Palestinians:

"All the Arab and Moslem governments maintain that they support the cause of Palestine . . . . In fact they support American imperialism and Israel. They declare they are friends of Palestine but the fact is that the jails of many Arab and Moslem countries are full of Palestinian prisoners."

The statement linked Zia with the Jordanian Army's move in the "black September" of 1970 against Palestinians living in Jordan. Zia at that time was an officer serving on special assignment in Jordan and has been reported to have played a role in aiding King Hussein's forces, which expelled the Palestinians in 1971.

Trial observers expect the proceedings to continue for many months. Appeals, if necessary, could go on for years.