Wednesday night 4,000 people stood and sang in honor of the Navy basketball team. Led by Mids in uniform, they tried to lift the roof of cavernous Halsey Field House with their chorus of "Navy Blue and Gold."

Standing at attention, Bob Hamilton, the little rookie coach with the little underdog team, felt something more than the exhileration of having upset one of the powers of the East - Georgetown - 5655.

He felt a shiver along the spine "That moment had a quality of class and tradition mixed together ," said Hamilton, trying to explain. "Those aren't exactly the words. Perhaps mystique . . . the Navy mystique.

"Whatever it was . . I felt it," said Hamilton. "The people stayed with us to the end, even when we lost the 15-point lead and fell behind (55-52). It was the biggest and best crowd since I've been here . . . they carried us along."

The mood after Catholic University upset St. Peter's, 64-63, was the same yet the reaction was different. The celebrating CU fans, in the words of coach Jack Kvancz, "finally cut loose and just went completely nuts. We really tied a good one on. My head is sore today, my throat is raw, but it's worht it. What a super, superduper win. When St. Peter's took the last shot at the buzzer I had already said, 'Sayonara.' I was sure we'd lost another one-pointer. The shot was dead on. But it was like the arm of the Lord reached out and he said," No sir. Catholic University wins this time. Finally."

Kvancz knows about tradition, too - CU tradition. "Our tradition is that the locker room's like a morgue whether we win, lose or draw. But last night my kids were jumping."

Navy and Catholic both have long, inglorious basketball histories. "When teams like Navy and us can stick it to the big boys just for one night, it's beautiful," said Kvancz. "It makes the bottom rung bearable.

"I know St. Peter's figured an automatic win. They beat GW by 15, we lost to GW by 13. They expected a laugher and left looking blitzed."

On Tuesday Hamilton confided to a friend. "I don't see any way we can beat Georgetown." Yesterday Hamilton was stammering in self-defense. "Well . . . er . . . I guess I meant I knew we could win, but I didn't think we would."

Both Hamilton and Kvancz, two men dwarfed by their players, find it easy to see the beginning of the end of their sufferings in one magic night.

"This has great meaning for us," said the Navy coach. "Winning is contagious. It also helps recruiting and promotion." Yesterday morning Navy quickly sold out its 500-seat allotment of tickets for Saturday's Maryland game at Capital Center. Can a generation of Academy apathy toward basketball evaporate so quickly?

Kvancz could crow "our gym was packed. The president of CU was there, recruits were there. Everybody sees us win and play well. My two point guards (Mike McNally and Don Farrell) had 17 assists and only two turnovers. We shot like dern pros. Hey, maybe I can get some players."

Yet both coaches know how close they were to defeat. CU, leading by a point with 10 seconds left, lost the ball on a collision in which a CU man was knocked into the bleachers and a St. Peter's player dislocated a finger. "There was no call," laughed Kvancz, who wasn't laughing then.

Navy once led, 51-36, then watched aghast as GU streaked 19-1 in just five minutes. "We turned conservative and lost composure. We'd lost to Temple and Air Force by a point, tha last one in triple overtime. It's a very, very good sign that we didn't quit when we fell behind," said Hamilton.

GU, as it has before this year, offered its opposition considerable assistance with the less than alert, poised play. After making its whirlwing comeback with full-court pressure, GU immediately went to a slowdown "double-high" offense with a bare 53-52 lead.

With 43 seconds left, GU's 6-foot-7 Larry Long leaped too soon and lost a jump ball to 6-1 Bobby Scott. The same Scott stole an offensive rebound from the towering Hoyas with 27 seconds left.

The last GU blunder was a doozy. The Hoyas, ahead 55-54, had four team fouls to give in those last 27 seconds and never took one, though GU coach John Thompson says he continously was giving the foul sign to his team.

Had Navy been forced to take the ball to sidecourt four times and start its play from scratch, would the final winning shot by Scott ever have been taken? The Hoyas have to doubt it.

"A whole lot of people felt bad around here today," said Thompson.

But a wholelot of people in Annapolis and Northeast Washington were still singing.