Authorities are investigating whether a Jordanian U.N. policeman who killed three American corrections officers in a gunbattle at a Kosovo (search) prison had links to the Palestinian militant group Hamas, a senior NATO official said.

As investigators tried to pin down Sgt. Maj. Ahmed Mustafa Ibrahim Ali's motive, a clearer picture of the April 17 attack emerged this week. Witnesses, U.N. officials, medical personnel and NATO (search) officers, in interviews with The Associated Press, described a scene in which the officers were trapped between a locked gate and Ali's assault rifle.

Eleven officers were wounded before the officers shot and killed Ali, a Palestinian from Jordan. No one is certain what prompted him to open fire, but a survivor said Ali was smiling during his shooting spree, a U.N. source familiar with the investigation said.

The attack came three days after U.S. President Bush endorsed a plan by Israeli Prime Minister Ariel Sharon (search) to withdraw from the Gaza Strip and back the permanence of some Jewish settlements in the West Bank. The plan rules out resettling Palestinian refugees in Israel.

A senior NATO official, speaking on condition of anonymity, said that besides the investigation into any links with Hamas (search), authorities were examining a trip Ali took to Saudi Arabia only a month before he joined the mission in March to see if it might be connected to the attack.

Jordan's government said Ali, 30, was a distinguished member of his homeland's special police unit and had been decorated for helping to ward off an attack on the Israeli Embassy in the Jordanian capital, Amman. The United Nations has refused to discuss details of the investigation.

Much is at stake for the United Nations in the outcome of the investigation because the police mission in Kosovo, and others like it, rely on throwing together officers from member countries regardless of political philosophy.

"The incident is so grave and appalling that it really calls into question the mission's integrity and unity," said Alex Anderson of the International Crisis Group, a Brussels, Belgium-based think tank.

Like Ali, the corrections officers were new to Kosovo. They arrived just 10 days before the attack and were part of an effort to bring professional corrections expertise into the prisons. Since the United Nations took control of the province in 1999, the prison has been supervised by police with little specialized training.

The world body moved into Kosovo after a 78-day NATO air war launched to stop former Yugoslav President Slobodan Milosevic's (search) crackdown on independence-minded ethnic Albanians.

The attack began at the end of the officers' first day at work. Sharing small talk, the officers piled into two vans and a sports utility vehicle and drove to the gate. That's when Ali opened fire.

Bullets pierced the vehicles. Kim Bigley, a prison warden from Paducah, Ky., died in the driver's seat. Gary Weston, of Vienna, Ill., pushed Michelle Lindo, of Haslett, Mich., out of the line of fire, saving her life. Seconds later, gunshots shattered Weston's skull, and he later died.

Lynn Marie Williams, 48, of Elmont, N.Y., was also fatally wounded by the gunfire.

The other officers pulled their pistols and sprang for cover. An Austrian officer in one of the outlying buildings, Andreas Pumpa, heard the shooting and ran toward it, only to run into Ali, who sprayed his legs with gunfire.

The officers exchanged fire with their attacker, who was armed with an M-16 automatic rifle. Blocked by the gate, and with buildings on either side, the officers were trapped.

"There was nothing to do but stand and fight," a U.N. official said, speaking on condition of anonymity. "And they stood and fought."

Ali mowed down a line of officers scrambling toward a wall. One of those wounded may be paralyzed.

When he had shot all those he could see, Ali paced around the vans, searching for more victims.

Inside the prison, people were confused. Several officers raced to the exit, but rounds began to pound into the door. With the only way out blocked, they hit the floor.

Three hundred yards away, in what the officers later called the killing zone, the Americans realized no help was on the way.

Finally, they got a break: Ali's weapon jammed. As he scrambled to clear it, the corrections officers counterattacked, managing to get into the guard shack where Ali's four subordinates cowered.

They seized the Jordanians' weapons and attacked Ali with equal firepower: His body took 16 rounds.

The officers were detained. Authorities suspect Ali's subordinates may have played a role because more than 400 rounds were fired. The investigation is examining whether they fed him ammunition — so he could keep shooting.

Williams died soon after being taken to the nearby Serb hospital. Weston was put on life support after the shooting and sent back to the United States. The U.N. mission announced his death Saturday.