NAIROBI, Nov. 18, 2009  -- The MV Maersk Alabama has thwarted another attack by Somali pirates, according to European Union and U.S. Navy officials.

"Pirates fired automatic weapons on MV Maersk Alabama who responded with fire," said an EU Naval Command Statement, "The crew managed to repel the attack and no casualties were reported."

The pirates' assault was countered by gunfire and a high-decibel noise device from a security team that is traveling aboard the Alabama to defend it from pirates.

Maersk spokesman Kevin Speers told reporters the ship was headed to Mombasa, Kenya, carrying food aid for war-torn Somalia when it was fired upon by a pirate boat carrying four gunmen.

Navy officials tell ABC News that all 20 members aboard the Maersk Alabama are now "safe and secure," and have resumed their journey.

It's the second time this year the U.S. flagged cargo ship has been attacked. In April, Somali pirates hijacked the Maersk Alabama and held the ship's captain Richard Phillips hostage on a lifeboat for five days before Navy snipers shot and killed his captors.

At that time, the ship was not equipped with armed guards, something crew members told ABC News they thought were needed.

Massachusetts Maritime Academy professor Capt. Joseph Murphy, who is the father of a sailor who was on the Maersk Alabama during the first pirate attack in April, said significant improvements to the ship's security have been made.

Murphy told the Associated Press that owners of the Maersk Alabama have spent a considerable amount of money since the April hijacking to make the vessel pirate-proof, including structural features and safety equipment. The most dramatic change is what he called a security force of "highly trained ex-military personnel."

The wife of the Maersk Alabama's captain, Paul Rochford, told WBZ-AM radio in Boston that she was "really happy" there were weapons on board for this attack.

"It probably surprised the pirates. They were probably shocked," Kimberly Rochford said. "I'm really happy at least it didn't turn out like the last time."

Phillips was not at the helm this time. He was headed to Norfolk, Va., for a museum event opening for a piracy exhibit where he will also thank his rescuers from the destroyer USS Bainbridge, who are home-ported in the city.

This will be Phillips' first meeting with his rescuers since his rescue. The piracy exhibit will also include the lifeboat he was rescued from, which is on loan from a Navy SEAL museum in Florida.

Since the attack in April, private security guards have been accompanying the crew on voyages through the dangerous Indian Ocean waters, where piracy is rampant.

In a statement, U.S. Navy Fifth Fleet Commander Vice Adm. Bill Gortney praised the actions of the Maersk Alabama's crew and security team.

"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," he said.

Despite increased patrols by global naval forces in the Gulf of Aden, and the presence of un-manned U.S. military drones off the coast of the Seychelles Islands, piracy continues to thrive.

Pirates Captured One Ship, Release Another for Ransom

Yesterday, Somali pirates captured the MV Theresa VIII, a Virgin-Islands owned chemical tanker with 28 North Korean crew members on board. The ship was hijacked north of the Seychelles Islands, the newest hot spot for piracy.

Pirates are claiming in news reports that the captain of the vessel has died of gunshot wounds, but there's been no confirmation of that so far.

After more than a month of contentious negotiations Somali pirates released a Spanish vessel Alakrana Tuesday. The ship was hijacked, also off the coast of the Seychelles on Oct. 2.

Spain's Prime Minister Jose Luis Rodriguez Zapatero confirmed the tuna trawler was released but would not confirm whether a ransom was paid. Pirate spokesmen told news agencies that they received over $3 million for the safe release of the 36 crew members.

The pirates had also demanded that two pirates being held by the Spanish government be released, but r Zapatero said the case would be handled by the justice system.

Lt. Nathan Christensen, a spokesman for the Fifth Fleet told ABC News that ships cannot rely solely on navy and military patrols to protect them. The Indian Ocean area most prone to piracy is roughly four times the size of Texas.

"We can't be everywhere at once," he said. "It's incumbent on individual shipping companies that they are able to either conduct evasive maneuvers or use embarked security teams or even use such things as fire hoses to prevent attacks."

Linda Albin, Luis Martinez, and Kirit Radia contributed to this report.