They had played 39 extraordinary minutes of basketball. They had exchanged the lead and momentum. Each had looked beaten. Each had looked victorious. All that was left for Duke and Kansas to do today was produce a memorable ending.

Duke Coach Mike Krzyzewski called a timeout with 58 seconds left. The score was tied at 67. At stake for both teams was five months of work and a dream.

Freshman Danny Ferry, who grew up in a basketball home, dreaming that dream over and over from his playground court right through DeMatha High School, had no idea he was about to live it. "I remembered Coach K telling us before the game that this was the type of moment we worked for all our lives," he said later. "I never thought then that it might be me."

It was him. It was Ferry, reaching down from his 6-foot-10 vantage point, who picked Mark Alarie's loose ball off the floor with 22 seconds left and banked in a layup that gave Duke the lead and, ultimately, a 71-67 victory in as taut a national semifinal game as anyone among the 16,493 in Reunion Arena has seen.

Ferry's layup and the ensuing sequence of plays -- Ron Kellogg's offensive foul on Ferry; Ferry's missed free throw; Kellogg's missed jumper and Tommy Amaker's rebound and two clinching foul shots with one second left -- put Duke into Monday's NCAA championship game here against Louisville.

The No. 1-ranked Blue Devils (37-2) broke the all-time NCAA record for victories in a season, one held by Kentucky since 1948, with their win. For No. 2 Kansas (35-4), the loss was more than heartbreaking; it was stunning, because for much of the second half, the Jayhawks looked like winners.

"With all our problems, we had a four-point lead and a breakaway layup with four minutes left," said Kansas Coach Larry Brown. "I never thought we'd lose."

Neither did Duke. That was what made the final moments so tantalizing. These were two teams that had found ways to win all season. And, in the end, it was perhaps only proper that a combination of hustle and luck produced a winner.

Both teams are so well-coached that each kept taking the other out of its offense. Kansas streaked to an 8-2 lead. Duke called time, adjusted and went on an 11-0 spurt. They struggled to the half with Duke leading, 36-33. The Blue Devils built a seven-point lead, the Jayhawks came back to lead by four.

"It was an exhausting game," said Alarie, whose defense on Danny Manning may have been the key. "I can't ever remember spending so much energy on defense. By the end, I was so tired, my legs felt heavy. I can't remember the last time that happened to me."

A number of players had afternoons that don't often happen. Alarie was four of 13 from the field and David Henderson was three of 12. But that was balanced by Manning's two-for-nine shooting and Greg Dreiling's one-for-seven day.

"Nothing was easy out there," said Kellogg, who led his team with 22 points. "Johnny Dawkins 24 points is a great player, so smart and so confident. We wanted to get him into foul trouble. That's the one thing we didn't do. It seemed like we did everything else we had to."

Each team felt it was on the verge of control throughout. Yet neither one was. Each team fought adversity: Kansas lost Manning and Dreiling to foul trouble and Archie Marshall to an injury when he sprawled on the floor after a driving layup. Dawkins played most of the second half with a twinge from his elbow to his hand after getting his hand jammed and Amaker had to come out briefly near the finish after getting hit, as he put it, "in a bad place, the worst place of all."

The game seesawed into the final six minutes tied at 61. From that point on, each play was burned into a memory.

First, Kellogg, wonderful from outside all night, buried a 20-footer from the base line to give Kansas a 63-61 lead with 5:25 left. Dawkins, who made 11 of 17 shots, missed from outside, and Manning scored his second and final basket of the game with 4:18 left to give the Jayhawks a 65-61 lead.

Krzyzewski called time. "I'd been through this with them so many times before that I knew we wouldn't panic," he said. "I didn't talk Xs and Os at all. I just said to Johnny, 'Forget that you're hurt.' I told the rest of them, 'Forget you're tired, forget referees, forget everything. Just be patient and think about winning.' "

Amaker, even in pain, insisted on going back in. "We really thought there was a lot of time left," he said. "There was no need to panic."

They didn't panic but Alarie missed what looked like an easy inside shot and Kansas pushed upcourt. Cedric Hunter flew down the right side, went up -- and missed.

Duke still trailed by four and had not scored in almost three minutes.

Dawkins said, "I was thinking, 'Be aggressive now. Look for your shot.' There's no sense backing off."

Cool as can be, Dawkins pushed clear and made a 20-footer to cut the margin to 65-63. Kansas, with the lead, spread its offense, to try to work the ball inside. Dreiling had already fouled out, but Manning hadn't.

The ball went inside to him and he turned, with Alarie draped on him as he had been all day, and shot long. Ferry rebounded. The Blue Devils came down and Henderson and Alarie ran a pick-and-roll. Alarie dunked, Manning committed his fifth foul and it was 65-65 with 2:47 left.

But Alarie, an 82 percent foul shooter, missed the free throw. On the Duke bench, assistant coach Chuck Swenson said he thought, "Murphy's Law."

Kansas again spread its offense and this time, Calvin Thompson, with a classy one-on-one move, nailed a 10-foot base-line runner and it was 67-65, Kansas. Henderson, still cold, tried from 20. It was off, but here came Dawkins soaring for the rebound, taking a short pop back up to tie it at 67 with 1:47 left.

Throats everywhere were tight. "Just play good defense and let the rest take care of itself," Alarie remembered thinking.

That is what the Blue Devils did. This time, Thompson's one-on-one move became one-on-three and there was Ferry, reaching over everyone for the rebound. At midcourt, Duke called time with 58 ticks left.

And from there, the dream became real life for Ferry. "We wanted to run our regular offense," Krzyzewski said. "Don't force anything, don't shoot too quickly, just look for a good shot."

The shot clock was running toward five when Alarie came off a screen and went up with a jumper. "I had to shoot 'cause I thought the buzzer was going to go off," he said. "But it was short, I guess because my legs were so heavy. Then, I saw Danny with it."

He had help from Dawkins, who flew through the lane, trying to grab the ball. He couldn't but he did tip it. "I thought I was going to get it but Cedric [Hunter] got his hand on it," he said. "All I could do was tip it."

It rolled on the floor to the right of the hoop and there was Ferry, reaching for it before it could go out of bounds. "I was at the dotted line when Mark shot," he said. "I saw it was no good and went towards the boards. Johnny kept it alive and there it was. I was in a daze after it went in."

He wasn't alone. Brown called time. Kellogg or Thompson would shoot the ball. Duke was in its "21" defense, designed to force the shooters to the base line. Sure enough, Kellogg drove the left base line. Ferry, on the weak side, saw him and came to help. They collided.

"I couldn't do anything but take a charge," Ferry said. "I wasn't going to block the shot."

Kellogg never saw Ferry. "Never," he said. "I went up, heard him yell and we went down. I didn't think I touched him. I thought we might get the call."

Referee Paul Galvan called the foul on Kellogg -- after the shot. If the shot -- which rolled around the rim and off -- had gone in, it would have counted. Instead, with 11 seconds left, Duke still led by two and Ferry was on the line.

"I was still in a daze," he said. "And nervous." He nervously missed. Brown, not wanting to give Krzyzewski a chance to set his defense, didn't call time. Kellogg rushed down, pulled up from 22 feet and shot. Way short. Suddenly, there was Amaker, all 6 feet of him, above everyone, clutching the ball.

"I never saw him jump like that in my life," Alarie said. "I thought it was Johnny."

It was Amaker, mustering his last ounce of energy to make one last wondrous play. His two free throws with one second to go were academic and for Duke, the dream continues.