ALAMEDA — There were moments in the 2014 NFL draft when Reggie McKenzie thought his patience had gotten the best of him.

The Raiders general manager had no way of knowing he was in the process of reversing the fortunes of a sagging franchise, but McKenzie knew what he wanted.

And it was about to slip away.

The first crisis came when the Buffalo Bills traded with the Cleveland Browns to move up to No. 4, just before the Raiders were scheduled to pick. An hour or so earlier, McKenzie told owner Mark Davis he was pondering trading up to No. 1 to get his man.

“Do you want Jadaveon Clowney?,” Davis asked.

McKenzie’s reply: “No. If I move up, I’m going to get Khalil Mack.”

With the Houston Texans wanting too much in return, the Raiders stayed put at No 5. With Clowney (Houston), tackle Greg Robinson (St. Louis) and quarterback Blake Bortles (Jacksonville) going 1-2-3, the Buffalo Bills were on the clock.

The Bills reside in the same city where Mack went to college.

“I was scared. They were right there in Buffalo,” McKenzie said. “They knew everything about him. I thought they were taking him and then I was kind of kicking myself there. When they took Sammy Watkins, that made my day.”

After the Bills took the Clemson wide receiver, the Raiders gratefully wrote Mack’s name on a draft card and an explosive edge rusher was on the roster.

Then the plot thickened.

As the first round unfolded and players came off the board, one name remained at the top for the Raiders — Fresno State quarterback Derek Carr.

McKenzie considered trading back in to the first round because Carr was graded as a top 15 player.

“I made some calls, but we were at the point where we weren’t good enough to trade a couple of picks just to move up,” McKenzie said.

On the final pick of the first round, Minnesota, looking for a quarterback, acquired Seattle’s selection at No. 32, and McKenzie was once again filled with a sense of dread.

“I thought they were going to take Derek,” McKenzie said. “They took Teddy Bridgewater.”

The Raiders took Carr at No. 36, both men became immediate starters, and after going 3-13 when both players were rookies, seasons of 7-9 and 12-4 seasons followed.

The Raiders made the playoffs in 2016 for the first time in 14 years, thanks in large part to as stunning a 1-2 draft punch as you’ll see. Gabe Jackson, a top-level guard, arrived in Round 3 because the Raiders held on to their pick instead of moving up to get Carr.

“Those are the two most important positions on any football team — your quarterback and your primary pass rusher,” ESPN analyst and former Philadelphia director of pro personnel Louis Riddick said. “Those are the guys you most need to close out a game, and they got them both.”

The draft is a hit and miss proposition, and McKenzie and the Raiders have had their share of misses.

But the Mack-Carr selections are like an eclipse, blocking out most everything else, and the picks will likely always be McKenzie’s signature achievement.

The Raiders have seen nothing like it since Al Davis got future Hall of Fame quarterback Ken Stabler in the second round of the 1968 draft and future Hall of Fame left tackle Art Shell one round later.

Phil Savage, an ESPN analyst and former personnel executive with the Baltimore Ravens and Cleveland Browns, marveled at McKenzie letting the draft play out.

“They let Mack come to them at No. 5, and then Derek Carr just fell in his lap,” Savage said.

How did that happen? In a classic case of over-analysis, some teams downgraded Carr because his older brother, David, was a former No. 1 overall pick by Houston. David Carr played 12 years in the NFL, but never ascended as an elite-level quarterback, in part because of the poor supporting cast in Houston to start his career.

Carr’s performance against USC in the Las Vegas Bowl — he was 30 of 54 for only 217 yards in a 45-20 loss — also helped keep him out of the first round.

“If Carr had not played against USC — he had a terrible day — he probably would have been gone before the Raiders’ second choice,” NFL Network analyst and longtime personnel man Gil Brandt said. “People looked at him and figured he had piled up his numbers playing against inferior opponents in the (Mountain West Conference).”

If Carr was stung by going after Bortles, Johnny Manziel (No. 22 to Cleveland) and Bridgewater, he shows no trace of it. Carr and Mack formed an instant friendship and vowed to be part of turning things around in Oakland.

“You could ask all the other quarterbacks, I’m sure they’d want Khalil on their team too,” Carr said.

Mack, however, said Carr hasn’t let him forget about who went first and who went second.

Not that it matters. Following the draft, Carr will be in line for a contract extension that could average $20 million per year. Mack, who is under Raiders control through 2018, will eventually cash in as well.

“I’m blessed to have him not only in the locker room but in my life,” Mack said.

For McKenzie, the 2014 draft was compensation for what happened in 1996. He was with the Packers then and they were ready to use the 27th pick on a linebacker name Ray Lewis. Baltimore took him at 26.

And the Ravens, also holding the No. 4 pick that year, had already taken a future Hall of Famer in tackle Jonathan Ogden.

“I was like, ‘Are you kidding me?,’ “ McKenzie recalled.

In the end, though, he got the last laugh by getting Mack and Carr.

“It’s nice to get impact players like that,” he said, “especially when they’re impact people, too.”