He believed in himself when others weren’t sure.

He wasn’t shy about telling people he could hit, and all he needed was a chance to prove it.

And when he got the opportunity, he changed the narrative from being viewed as cocky to confident.

Is this what people will say about Luke Voit a dozen years from now?

Possibly, but try Jim Leyritz in the ’90s.

Shane Spencer has been the comp put on Voit, because he surpassed Spencer hitting 10 home runs and driving in 27 runs in 27 games late in the 1998 season, when Spencer was summoned to the big leagues after nine years in the minors.

However, the longer you listen to the 27-year-old Voit tell everyone, “I know I can hit,” Leyritz comes to mind.

“It’s not being cocky if you can back it up,” Leyritz told The Post on Monday, when Voit was named AL Player of the Week for hitting .458 (11-for-24) with three homers and eight RBIs. “I always tell people about the headlines in New York about me being cocky and then that changed to, ‘Leyritz backs up bravado.’ ”

As the Yankees prepare to face the A’s in the AL wild-card game Wednesday night at Yankee Stadium, the visitors must account for Voit after what he did in 39 games since being acquired from the Cardinals on July 29 for pitchers Chasen Shreve and Giovanny Gallegos and international bonus slot money.

In a perfect world, the left-handed hitting Greg Bird was going to return from ankle surgery and provide home runs and RBIs from first base. That didn’t work, Voit came aboard and has developed into a player a scout who has seen a lot of him believes isn’t a fluke.

“I think he is [for real],’’ the scout said of the 6-foot-3, 225-pound right-handed hitter. “He really knows the strike zone and is as strong as a bull. Anybody who hits the ball the other way in that park is a perfect fit. I think the Cardinals will regret [trading him]. Even if he doesn’t wind up [playing every day], he will be a good platoon player against lefties.’’

According to Voit, all he needed was a chance to play in order for his talent to surface. At first, Voit played against lefties. Then he took over the first-base job with a bat that punishes baseballs.

“He’s not a fluke,’’ CC Sabathia said of Voit, who spent six years in the minors before reaching the big leagues last year and played in a combined 78 minor league games this year. “He is hitting balls hard every day. You just want to ride that wave.’’

The popular opinion among scouts is that Voit can be pitched to inside, but a .333 (44-for-132) average with 14 homers, 33 RBIs and a 1.095 OPS as a Yankee indicate pitchers are foolishly ignoring the reports or missing location.

Postseason scouting reports are more detailed than during the regular season and the A’s are good at compiling them, so we will see how Voit meets the next challenge.

And it’s not as if Voit is feasting on only lefties. He is hitting .312 (29-for-93) with eight homers and 22 RBIs with a 1.015 OPS against right-handers. Against lefties, he is batting .340 (17-for-50) with seven homers, 14 RBIs and a 1.169 OPS.

Leyritz hasn’t met Voit, whose machinations while rounding the bases after homering have irked some, and his personal line of clothing 39 games into a Yankees career has raised eyebrows. Yet, Leyritz sees a similarity, and it reaches further than believing in his ability.

“I played first when Donny [Mattingly] was out. I knew he was coming back and I knew that if I didn’t perform I wasn’t going to get another chance at another position,” said Leyritz, an undrafted player coming out of the University of Kentucky whose three-run homer off Braves reliever Mark Wohlers in the eighth inning of Game 4 of the 1996 World Series remains a part of Yankees lore. “He has stepped in and took advantage of it. He has done a great job and it is fun to watch.’’