(Replaces "rejects" with "dismisses" in headline)

HOUSTON, Oct 29 (Reuters) - A U.S. judge has dismissed a lawsuit over a disputed cargo of Iraqi Kurdish crude oil that showed up last year off the shore of Texas, prompting months of legal wrangling as Iraq sought to block the Kurdistan Regional Government (KRG) from directly exporting oil.

The case was dismissed on Wednesday by U.S. District Court Judge Gray Miller because the vessel carrying the crude sailed away after the U.S. buyer balked at taking delivery because of the legal fight. In the eyes of the court, without a cargo there could be no dispute and the case was moot.

The end of the lawsuit means U.S. courts have yet to rule decisively on the fundamental question of whether the KRG has the right to export oil from its lands without permission from Baghdad. Washington has struggled to mediate the conflict.

The KRG claimed on Thursday the dismissal shows there is "no legal obstacle in the United States or elsewhere to the to the KRG's exercise of its right under the Iraqi Constitution to market and sell oil around the world."

But a source familiar with the case said the KRG view was flawed.

A previous finding from the judge, which still stands, says his court can hear ownership disputes between the two sides. That ruling could be applied in other U.S. district courts.

"If the KRG were to bring in crude now to the U.S., they'd get hammered in court," the source said.

(Reporting By Terry Wade; Editing by Christian Plumb) ((terry.wade@thomsonreuters.com; 713 210 8513; Reuters Messaging: terry.wade.thomsonreuters.com@thomsonreuters.net))

Keywords: CRUDE IRAQ/KURDISTAN