The United States will have to confront pirates and hold them "accountable for their crimes," he said at the start of a Transportation Department event.
Obama spoke one day after the U.S. military killed three pirates who had been holding the captain of the U.S.-flagged Maersk Alabama hostage on a lifeboat.
Snipers shot the pirates and rescued Capt. Richard Phillips.
Phillips' "safety has been our principal concern," Obama said. The president added that he is proud of the military's actions leading to Phillips' rescue.
Listen: Was this weekend's victory on the high seas also a political win for the president? CNN Radio reports.