A skiff carrying suspected pirates approached the Maersk about 200 miles north of Madagascar on Tuesday, said Wing Cmdr. Paddy O'Kennedy of the EU Naval Force, according to The Associated Press.
The pirates didn't shoot, but a security team on the Maersk fired warnings shots and the boat took off.
The encounter was classified as a suspicious approach, not an attack, AP said. The ship was headed to Mombasa in coastal Kenya.
The Maersk has been attacked twice before, including a dramatic hijacking in 2009.
In April 2009, the Maersk's captain, Richard Phillips, was captured and held for days in a lifeboat. Snipers killed his captors and arrested a pirate, who was sentenced last month to more than 30 years in prison, CNN said.
The ship was attacked again in September, when five armed pirates targeted it as it sailed off the Somali coast, ABC News said.
Insurance companies, which have been forced to pay large ransoms for hijacked ships, are proposing a privately operated fleet to accompany ships through areas rife with piracy. The fleet would be made up of fast, armed patrol boats to combat attacks in the Arabian Sea, Indian Ocean and Gulf of Aden.
The idea is to help navies protect commercial ships, not replace military forces, Giles Noakes, chief maritime security officer for the Baltic and International Maritime Council shipping trade association, told AOL News for a recent story.