Computer equipment worth $1.9 million which the U.S. military says was a gift for Iraqi schoolchildren but was auctioned off for less than $50,000 was sold legally, Iraq's customs authority said Sunday.

The U.S. military said Friday $1.9 million worth of computer shipment bought by the U.S. government, which should have gone to schools in the southern province of Babil, was auctioned by a senior Iraqi official for less than $50,000 at Iraq's main port Umm Qasr.

The customs authority said in a statement it had the right to auction goods that remained unclaimed at the port for 90 days and added that it did not know the shipment belonged to the U.S. Army or was destined to schools in Babil.

Nawfal Saleem, head of the authority, said in the statement the sale had been canceled and about 90 percent of the shipment was being sent back to Umm Qasr port for the shipper to claim.

Corruption has been a major problem for Iraq since the 2003 U.S.-led invasion. Transparency International's 2009 corruption perceptions index ranked Iraq as one of the world's most corrupt nations -- 176 out of 180 countries.

(Reporting by Aseel Kami, Editing by Rania El Gamal and Michael Roddy)