CHARLOTTESVILLE, NOV. 17 -- What began as a football funeral -- the possible end of Joe Krivak's career as head coach at the University of Maryland -- ended with Krivak being carried off the field by his jubilant players as the Terrapins stunned eighth-ranked Virginia, 35-30, before a sellout crowd today at Scott Stadium.

It was an emotional day in a game in which seldom-used freshman Mark Mason scored second-half touchdowns on runs of 59 and eight yards as the Terrapins scored 28 points after intermission, then made a stirring goal line stand in the final two minutes.

At the final gun, Maryland (6-5, 4-3 in the ACC) had rallied from a 21-7 halftime deficit, gained its first winning season in five years, beaten a top 10 team for the first time in six years and possibly saved Krivak's job.

"It's a great win for the program, for the school and for Joe Krivak," said Maryland Athletic Director Andy Geiger, who will meet with Krivak starting Monday to discuss the coach's future. "I saw everything you could want from a football program today."

Virginia will keep its New Year's date in the Sugar Bowl against the Southeast Conference champion, but the defeat was nevertheless costly for the Cavaliers (8-2, 5-2). On the final play of Maryland's climactic defensive stand, a fourth-down sack of quarterback Shawn Moore by linebacker Louis Johnson, the Heisman Trophy candidate suffered a dislocated right thumb.

The senior all-American was operated on at University of Virginia Medical Center and, according to his doctor, may be ready when the Cavaliers play in the Sugar Bowl New Year's night, a bid that will be extended them despite the loss today.

"There's no difference, everything's the same as it has been," Mickey Holmes, executive director of the Sugar Bowl said in a telephone interview after the game. "You know where we'll be on the 24th (when bowl bids are formally extended). It doesn't change anything, we're still involved with an excellent football team and an excellent university. . . . It's happened before, it'll happen again. You pay your dues and you take your chances."

Amazingly, Maryland's victory might place the Terrapins back into the bowl picture. With a number of spots to fill and a dwindling number of winning teams to fill them, Maryland -- with four losses to top 25 teams -- could become a candidate.

Should that happen, Geiger said today it would "dramatically" change the evaluation process that will determine Krivak's future. Of his talks with Geiger, Krivak said, "We'll do what's best for this program."

Krivak, 18-25-1 during his four seasons as coach, wasn't ready to depart quietly. Maryland went for it on a fourth and one from its 29-yard line in the first quarter.

The Terrapins were successful on a second fourth-down attempt on the same drive, which ended with a one-yard touchdown run by Troy Jackson. Maryland also scored on a six-yard pass from Scott Zolak to Gene Thomas -- six plays after Dan DeArmas ran 13 yards from punt formation on fourth and two.

"In a game like this you've got to take chances. I mean what the hell, you've got nothing else to lose," said Krivak. "You have to give yourself a chance to win."

Maryland certainly acquitted itself well on that count, outgaining Virginia 450 yards to 409 and keeping the football for 35 minutes 6 seconds to the Cavaliers' 24:54.

Mason, a freshman who had only 25 carries this season, accounted for 147 yards. All but two of his 116 rushing yards came in the second half after he replaced Jackson, who went out with turf toe.

An All-Met player from Churchill High in Potomac, Md., Mason was expected to give Maryland an infusion of speed. But apart from a 52-yard effort in the waning minutes of a 41-13 victory over Wake Forest on Oct. 13, he had languished on the bench.

In the first minute of the third quarter, Moore fumbled after he was sacked by linebacker Glenn Page, with Maryland's Rick Fleece recovering at the Virginia 19. Mason carried for 11 yards on first down; three plays later Zolak hit wide receiver Barry Johnson with a seven-yard pass to cut Virginia's lead to 21-14.

After a punt, Maryland took over at its 39. On first down Mason gained two yards on a pitchout. Running the same play on second down, he scooted around left end for a 59-yard score to tie the game. With 11:23 remaining, Mason scored the winning points on an eight-yard run around right end.

"I would have liked more playing time; I knew I wouldn't start because Troy's a great back," Mason said. "Week after week {the coaches} said they'd give me a shot . . . but I still have a lot of learning to do. Troy would have done the same thing if he was in the game."

Maryland defensive back Michael Hollis intercepted a Moore pass attempt to wideout Herman Moore, but the Terrapins stalled at their 13. DeArmas got off a 47-yard punt, but it was returned by Jason Wallace for a touchdown, putting Virginia ahead, 28-21, with 7:50 to play in the third quarter.

After Wallace's return, Maryland used DeArmas's run to sustain a 77-yard drive, tying the score on the pass from Zolak to Thomas. Virginia marched from its 28 to the Terps 38 on the ensuing possession but cornerback Scott Rosen intercepted a Moore pass for Terrence Tomlin at the 13.

After gaining a first down, Maryland faced third and 14 from its 21. However, Zolak found Marcus Badgett on the left sideline for a 71-yard pass play to the 8. Mason scored his second touchdown, the eventual game-winner, on the next play.

The Cavaliers had two possessions in the final six minutes.

On the first they had first and goal at the Maryland 7. Tailback Terry Kirby gained three yards, then Shawn Moore carried for two. On third down the quarterback rolled to his right after a play-fake and had Kirby open in the end zone. But his pass was knocked away by Rosen.

On fourth down Moore rolled left, but was caught from behind by Johnson. He hurt his thumb on the play and did not return.

Maryland took a deliberate safety, DeArmas running out of the end zone with 40 seconds remaining. After the free kick, Virginia got the ball again at its 40 with 39 seconds to play.

Reserve quarterback Matt Blundin hit Herman Moore for nine and 10 yards, but was sacked by Derek Steele on the next play. The clock then ran out, setting off a celebration that had players dancing on the field and Geiger standing outside the Maryland locker room congratulating everyone who crossed his path.

"We're a good team, we knew we were a good team and this was our day to show it," said linebacker Jack Bradford. "I feel great -- this is a memory I'll have for the rest of my life."