The IRS didn't dispute that Steinbrenner — the New York Yankees' managing general partner, son of "The Boss" — would have had the refund coming.

The dispute centered on timing. The IRS argued that the two-year statutory limitation for a partnership-related refund had expired. Steinbrenner's attorneys said the circumstances dictated an ordinary three-year statute of limitations, and Merryday ultimately agreed.

"We're obviously pleased with the outcome," said Steinbrenner, who has a residence in Tampa, "but we had a good case."

The groundwork for the federal lawsuit was laid in March 2007, when the late George Steinbrenner came to terms with the IRS over audits of a Yankees Holdings company for tax years 2001 and 2002.

The IRS adjustments had negative ramifications for the family trust, of which Harold Steinbrenner is a beneficiary.

His tax liability for 2001 and 2002 rose by nearly $1 million combined, court records show.

He paid the tax bills. Here's where it got more complicated:

The IRS also took the position that the family trust could not distribute a loss to beneficiaries for 2002. But the trust wasn't barred from doing so for 2001.

So the trust amended its 2001 return, carrying back a net operating loss from 2002 to offset gains in 2001, records state.

And Steinbrenner, like the trust, filed an amended 2001 return, claiming a refund of about $585,000. Four months later, in December 2009, the IRS paid that, plus interest: $670,493.78.

Two years later, the IRS filed a federal lawsuit, saying the refund should not have been paid.

On Friday, Merryday sided with Steinbrenner and his wife.

In the order, the judge expressed sarcastic frustration over the difficulty of determining which statute of limitations should apply.

"I think he expressed what a lot of people feel, the frustration with how complicated the tax law can be," said Steinbrenner attorney Edward F. Koren, one of three Holland & Knight lawyers on the case.

Merryday referred to one phrase in the Internal Revenue Code as having a "grossly and distractingly (yet typically) misplaced modifier" and said it expressed "nonsense."

He accused another passage of "deftly avoiding usefulness."

In a written motion, Steinbrenner's attorneys had started a sentence with "It could not be more clear. …"

Merryday agreed with the point that followed.

But he wrote that "no one should use the phrase 'it could not be more clear' in discussing" the Internal Revenue Code.

News researcher John Martin contributed to this report. Patty Ryan can be reached at pryan@tampabay.com or (813) 226-3382.