"We've beaten better teams," Maryland Coach Lefty Driesell noted in laconic understatement. But this afternoon, to the delight of 4,000 Japanese fans, the Terps became the first American university basketball team in more than 10 years to lose in Japan.

The all-Japan team, made up largely of recent university graduates, shocked the overconfident Terps, 79-77, with speed, tenacity and tough physical tactics. The Japanese repeatedly charged around, beneath or over prostrate opponents in plays that would have drawn fouls in the United States.

The clock ran out after an especially controversial play in which a Japanese player badly twisted an ankle. The Japanese player dived for Maryland's John Robinson in a successful attempt to keep him from scoring the tying field goal with four seconds left.

As one of the Maryland players remarked later, the Japanese player, Yasuyuki Nakajima, "did the right thing for his team." The Japanese referee did not call an intentional foul and Maryland took the ball out of bounds. With Driesell shouting, "One more second, one more second," Ernest Graham took an inbounds pass and lofted a 35-foot shot that spun off the rim as the game ended.

"That's the worst referee I ever saw in my life," snapped Maryland center Taylor Baldwin. "Every call they made -- travels, fouls -- they called against us and not against them."

To the players, the ultimate proof lay in the statistics: 20 offensive and five defensive fouls against Maryland, 11 offensive and four defensive fouls against the Japanese.How else, the players asked, could anyone explain why they lost by two points after having defeated the same team, 92-64, a week ago?

The problem, Graham said after bowing to Driesell's order not to discuss the refereeing, was "our sloppy playing."

After falling behind, 8-2, in the first minute, the Japanese startled Maryland by pulling ahead, 25-24, with nine minutes to go in the first half. Incredulity gradually overcame the spectators in Yoyosi Stadium, built for the 1964 Olympics, as the Japanese clung to their lead for the next five minutes. Fans cheered sporadically and laughed, fully expecting the Americans to turn on the pressure as effortlessly as they had turned it off. Indeed, Maryland led, 45-43, at the half.

As the game seesawed, the Japanese surprised the sometimes lackadasical Maryland players by forcing turnovers and darting through defenses. Center Norihiko Kitihara, 6 feet 7, repeatedly whirled past flailing arms to score 27 points. Maryland's high scorers, Graham and Reggie Jackson, could score only 20 each.

Guard Koji Yamamoto, just 5-9, looked more like a running back on a football team as he elbowed and glanced off Maryland players, dumping them to the floor at least twice. Once a stunned Maryland player looked balefully at the referee in anticipation of a foul call, then realized the game was still crashing on some 40 feet down court.

Then there was Japan's "big man" Yasutaka Okayama, at 7-4 the tallest man in Japan, waiting under the basket to tip the ball in or pick off rebounds.

"We can usually press and break it open," Graham said, "but today we didn't have the press so the game stayed close the whole time." How did Graham feel about participating in the first loss by an American varsity team in more than 40 games played in Japan.

"I'm okay myself," he said, groping for the words. Then he smiled and said, "I guess we made history."

Jackson remarked that Maryland took the Japanese a little lightly.

"They're a good basic team," he said. "They should teach us a lesson. Next time we'll prepare for them better. Just because we beat them one time doesn't mean we'll beat them the next time."

To the Maryland players and coaches, the mere thought of losing another game is beyond belief. "I hope we all learn from experience," Dreisell said. "I didn't want to lose, but as long as you play games, you're going to lose sometimes."

A big question about Sunday's game is whether guard Greg Manning can return to the lineup after having a fever several days. Manning was well enough to attend today's game, but did not wear a uniform. He said he hoped to play Sunday.

Missing from the trip are two of Maryland's best players, Buck Williams and Al King. William is with the U.S. Olympic team and King said simply he did not want to come.

"That's no excuse, though," said an assistant coach, John Kochan. "We should have won with the players we had, regardless of the referee. We just didn't play a good game."

At least two of the coaches seemed to have had premonitions of what was to happen. "I was sure we would win," said Japan's coach, Motoo Kohama, who studied coaching 10 months last year at the University of Kentucky and works fulltime to build up Japanese basketball at different colleges "The Maryland team," he said, "does not have any set information."

Despite the loss, Maryland still leads what the manufacturers of Kirin beer, sponsor of the series, describe as "Kirin World Basketball '80." Until today, the Maryland team had four easy wins, beginning with a 139-75 victory over a Japanese college all-star team June 20. Maryland defeated the all-Japan team the next day, beat a team from mainland China, 103-71. June 22 and, four days ago, drubbed the Japan college all-stars, 106-71.

Maryland will meet the China team again Sunday in a game that could cause a three-way tie for first place. China and the all-Japan team have 3-2 records, and the latter will play a game Sunday it has every prospect of winning.