"When you're a kid," Adrian Branch said, "you dream about being a hero and taking the last shot before a packed house to beat a big team."

Yesterday, that dream became reality for the freshman forward from De Matha High School when his 15-foot jump shot from the foul line with no time remaining in overtime gave Maryland a stunning 47-46 upset of top-ranked Virginia at Cole Field House.

The Maryland victory ended the Cavaliers' winning streak at 15 games and the Terrapins' losing streak at four. Worse for Virginia (27-2), it meant the Cavaliers had to settle for a tie for the regular-season ACC championship with North Carolina. Both finished 12-2 in the league; a draw today in Greensboro, N.C., will determine the top seed for the ACC tournament starting Friday.

The winner of the draw will play last-place Georgia Tech in the first round. The loser will play Clemson. Maryland (15-11 overall, 5-9 ACC) will open the tournament against North Carolina State Friday at 2 p.m., and Wake Forest will play Duke at 9 p.m. But for the Terrapins, yesterday's victory overshadowed everything else.

"This is the climax," said Maryland forward Herman Veal, whose turnaround jumper at the end of regulation tied the score at 44 and sent the game into overtime. "It just can't be any better than this."

The offensive star was Branch, who scored a career-high 29 points by making 12 of 17 shots from the field and five of six from the foul line.

Just as important was the performance of sophomore center/forward Mark Fothergill, who held Virginia's Ralph Sampson to one field goal--a disputed dunk--in five attempts. The 7-foot-4 all-America was not a factor, and his miss of a free throw with three seconds remaining in regulation enabled Maryland to send the game into overtime.

Branch's game-winning shot was set up after the Terrapins called time out with 13 seconds showing on the clock. Branch took the ball from Pete Holbert and drove right, toward the circle, with about six seconds left.

"I looked up and saw five seconds left on the clock and knew we had to put a shot up," Branch said. "I felt it. I knew I'd hit it." The shot--a left-handed push shot over Virginia's Jeff Jones--hit nothing but net.

"It was a million-dollar shot," said Terrapin senior Reggie Jackson.

There was some confusion about whether there should have been one second left. But the officials checked with the timekeeper and ruled that the game had ended.

Maryland Coach Lefty Driesell, who had earlier done one of his famous double-stomps and come out of his jacket to dispute a referee's call, danced off the court with both arms upraised.

"I'd put Adrian together with John Lucas as the best freshmen I've ever had," Driesell said of the 6-foot-8 Branch, who broke Albert King's regular-season freshman scoring record yesterday. He had 391 points in 26 games; King had 381 in 28.

The final play of regulation called for Dutch Morley to throw an inbounds pass to any Maryland player who was open. Sampson was supposed to guard the 6-2 Morley. "But I stepped back and threw the pass, and Ralph wasn't even a factor," Morley said.

The pass went about 80 feet to Veal, who took the ball off Jones' fingers. Veal's turnaround nine-footer from the left side of the lane hit the rim twice before dropping in as the buzzer went off, starting Maryland's first celebration.

"I thought we'd won the game or something," Driesell said. "I looked out to half-court and saw our players jumping on top of one another. I thought we'd kill each other and not have anybody to play the overtime."

Veal's shot took one of the few good bounces all season. Maryland lost close games to Georgia Tech (twice), Virginia and North Carolina in the last seconds. They all flashed through Veal's mind as the ball was bouncing from one side of the rim to the other. "I knew it was a brick when I shot it," Veal said, "so I just prayed."

The game was a stallball bore early, with both teams standing around looking at each other. Branch made five of six shots in the first half, and Sampson missed his only shot--a 15-footer--as Maryland took a 23-21 at halftime.

In the first game between the teams, Maryland led by 12 points early in the second half, but lost in overtime. Yesterday everyone kept waiting for Sampson to break out and take over the game in the second half. He never did.

However, Virginia stole the ball twice to start the second half, and took a 25-23 lead. Branch answered with a high, arching jumper over a fully extended Sampson to tie the game at 25. But Virginia took a 31-27 lead on Sampson's follow-up slam dunk with 15:12 to play.

The Cavaliers had several chances to increase their lead to five or more points. But Virginia's Craig Robinson and Jones missed successive one-and-one foul shooting sets in the last 3:32.

When Branch made a pair of free throws with 1:09 left in regulation, Maryland went ahead, 42-41. Jones made a lean-in jumper over Steve Rivers to put Virginia back on top, 43-42.

The Cavaliers hoped to wrap up the game and preserve the No. 1 ranking when Sampson went to the foul line with three seconds remaining, after a rare miss by Branch. But Sampson hit only the second shot, for a 44-42 lead. And Veal took full advantage at the buzzer.

Veal started the overtime by stealing the ball from Sampson, which led to Jeff Adkins making the first of two free throws for a 45-44 Maryland lead. Sampson's pair at the line put Virginia ahead, 46-45, with 4:10 remaining. Maryland held the ball from there.