Johan Kriek, who almost quit the tournament because of a line dispute in the second round, upset top-ranked John McEnroe, 6-3, 3-6, 6-4, today to win the U.S. National Indoor tennis tournament.

It was the second week in a row that McEnroe has lost in the final of a major tournament. Last week he was beaten by Ivan Lendl in Toronto.

It was the second major career victory for Kriek, 23, who won the Australian title earlier this year but is only 16th on the world computer list. He was seeded eighth here and won $40,500. McEnroe got $20,250.

Kriek surprised McEnroe in the first set by taking a 3-0 lead. In the second set, McEnroe was down, 1-3, but won the fifth game after being down a break point. He battled back to deuce twice and finally won on a forehand shot to the base line that first was called out by a linesman, who was overruled by umpire Frank Hammond.

McEnroe challenged the official briefly and asked why he reversed the call. "Because I saw it. It was right here," Hammond replied, pointing to the spot a few feet from his chair.

Kriek, who had a similar dispute earlier in the week against Tim Gullickson and even had donned his sweat suit to leave the court, was restrained with the officials.