The attack caused panic among hundreds of stranded migrant workers and Libyan refugees who were trying to board the Red Star One, a ferry chartered by the International Organization for Migration. In the chaos, some families were separated and the boat had to redock twice to sort it all out.
The timing of the shelling suggested Libyan forces were deliberately trying to disrupt the evacuation. Othman Belbeisi, an IOM official, said rockets started flying just minutes after he and others first stepped off the ferry. "The whole place was shaking and people started running in different directions," he said.
On Tuesday, a senior Libyan official said the Libyan army would do what is necessary to block sea access to Misrata, already besieged by land for the past two months. Last week, Gadhafi's troops were caught laying sea mines, disrupting shipping as NATO struggled to clear a safe access route to Misrata's port. The Red Star One had waited at sea for three days before risking the approach on Wednesday, aided by a tug boat.
Misrata is the main rebel stronghold in western Libya, which remains largely under Gadhafi's control, while the rebels have been holding on to most of the east. Since the uprising against Gadhafi broke out in mid-February, the two sides have largely been locked in a stalemate. The international community's bombing campaign, launched in mid-March, has kept Gadhafi's forces from advancing to the east, but has failed to give the rebels a clear battlefield advantage.
In Benghazi, the opposition stronghold in eastern Libya, rebel military spokesman Col. Ahmed Bani depicted the bombing of Misrata's port as a crime against humanity. He also reported heavy fighting in the southeastern town of Kufra.
Bani was asked if the rebels were hoping that some foreign governments would offer ground troops to support their cause.
"We have the men on the ground, we have the will, the courage, what we need is proper armaments to carry it out," he replied. "It's our country and better for us to fight for our freedom ... rather than others sacrificing themselves for us."
In Europe, support for giving funds to the Libyan rebels - presumably to buy arms, equipment and munitions with which to overthrow Gadhafi - seemed to be growing as distaste for a long air war increased. Officials from countries involved in the military campaign will likely announce ways to help the rebels financially as they meet Thursday in Rome.
At the United Nations, meanwhile, the prosecutor of the International Criminal Court said he has evidence that Gadhafi's security forces have systematically attacked civilians in trying to crush the armed uprising.
Luis Moreno-Ocampo told the U.N. Security Council he would seek arrest warrants in coming weeks against three Libyans who he said appear to bear "the greatest criminal responsibility" for crimes against humanity. He did not name them.
Misrata has been especially hard-hit during the fighting, with Gadhafi trying to break resistance in western Libya, his only chance of clinging to power in a possible partition of the country.
Thousands of migrant workers were stranded in Misrata when the anti-Gadhafi uprising broke out. In recent weeks, migrants were gradually evacuated on aid ships, with those left behind living in a squalid tent camp near the port.
Aid officials said a man, a woman and two children in the camp were killed by Wednesday's rocket attack.
Saka Yossie, 27, a worker from Ghana, said he was in the camp when Grad rockets hit. "We were just sitting there when the bombs came down," he said. "They died right in front of us."
Yossie said he'd spent six weeks in the camp, sleeping in a tent with very little food and water. "Now I thank God for taking me from this place," he said after stepping aboard the ferry.
The ferry started taking on passengers shortly after the shelling.
Some migrant families arrived in the back of a pickup truck with their belongings. Then dump trucks arrived, their backs packed with hundreds of male migrants, mostly from Niger and other impoverished African countries. The migrants poured out of the trucks and raced to board the ship, many carrying no luggage.
The migrants were being given priority because they have no place to stay in Misrata, aid officials said.
However some 300 Libyans, mostly families with children, also tried to get on board. Some rushed the boat, ignoring calls to stop. At that point, the boat surprisingly took off, apparently to prevent overloading, but leaving about 400 people on the dock.
The boat's surprise departure caught many on the wrong side, and the ship had to redock twice more.
Among those boarding were 25 patients to be evacuated to Benghazi, the rebel stronghold in the east. Four were in improvised intensive care units. A woman with Down syndrome kicked and screamed as a group of men carried her aboard. An old man was pushed on in a wheelchair, and an old woman struggled aboard with her walker.
Just before the final departure, someone from the medical team said that one of the ICU patients was in unstable condition and needed to get off the ship.
Medics wheeled the injured man's bed near the back door. The man was unconscious and a medic helped him breathe with a hand pump. Dr. Dimitrios Mognie of the International Medical Corps said the man's trachea had been ruptured and he needed surgery. Hospital crowding had meant he couldn't get it in Misrata, so he was headed to Benghazi.
But his condition deteriorated in the chaos.
"There's a 90 percent chance he'll die on the ship, so it's better for him to stay and die here," Mognie said.
Associated Press reporters Michelle Faul in Benghazi and Edith M. Lederer at the United Nations contributed to this report.