A federal judge has rejected an order for U.S. marshals to seize and turn over to Iraq crude oil from a tanker anchored off of Galveston.

Local reports Judge Gray Miller ruled in favor of the Kurdistan Regional Government on Monday. He says the U.S. lacks the authority to seize the oil because Kurdistan's ownership dispute with Iraq involves the location where the oil was pumped, not the coastal waters. 

The tanker has been near Galveston for nearly a month. It carries about 1 million barrels of oil produced in the semiautonomous Iraqi region of Kurdistan.

The Kurdish and Iraqi governments both claim ownership. Iraq has sued to stop the cargo from being offloaded in the U.S.

Iraq has 10 days to file an amended complaint.