It didn't go so well this time for the pirates; the victims returned fire. From the November 18, 2009 New York Times:
Yes, it is rather amazing how turning a low-risk activity (piracy) into a high-risk activity seems to help, doesn't it? Into the 19th century, American merchant ships were generally armed--and not just with small arms--to deal with the problem of piracy. But the prevailing sentiment elsewhere seems to be to pay ransom instead.
In a separate episode, the captain of a hijacked chemical tanker was reported to have died of gunshot wounds inflicted when pirates seized the MV Theresa with 28 North Korean crew members northwest of the Seychelles on Monday. The spate of attacks reflected the increasing boldness of pirates roaming far from their bases in Somalia to seize vessels and sailors to hold for ransom.
The United States Navy Central Command said four suspected pirates in a skiff came within 300 yards of the Maersk Alabama at 6.30 a.m. Wednesday about 600 miles off the northeast coast of Somalia as it headed for the Kenyan port of Mombasa.
But a security team on board the Maersk Alabama responded with small-arms fire, long-range acoustical devices painful to the human ear and evasive maneuvers to thwart the attack, the Navy said in a statement.
“Due to Maersk Alabama following maritime industry’s best practices such as embarking security teams, the ship was able to prevent being successfully attacked by pirates,” said Vice Adm. Bill Gortney, the commander of the Central Command. “This is a great example of how merchant mariners can take pro-active action to prevent being attacked.”