The MT Biscaglia was released in the early hours of Friday, the diplomat said. He asked for anonymity because he was not authorized to speak to the media. He said he did not know whether a ransom had been paid.
The ship was seized in the Gulf of Aden on Nov. 28 with 25 Indians and 3 Bangladeshis onboard. An Irishman and two British security guards jumped overboard during the attack and were rescued by helicopters from an international naval coalition patrolling the area.
The ship's owners were not immediately reachable for comment.
Last year, Somali pirates hijacked more than 100 ships, including a Ukrainian-flagged vessel loaded with tanks and arms that is still being held. Most are released after the payment of a ransom but more than a dozen are still being held.
Representatives from dozens of nations are expected to attend a three-day anti-piracy conference in Djibouti beginning Monday.