Daniel Mengden was stunned when the Houston Astros traded him last July, thinking his status as a promising hometown prospect might shield him from such a fate. In reality, the rookie right-hander belonged in an Oakland Athletics uniform all along.

With his old school windup, handlebar mustache and high socks, Mengden evokes memories of Catfish Hunter and Rollie Fingers, A’s Hall of Famers from their glory days in the early to mid-1970s, when they won three consecutive World Series.

And Mengden’s stuff on the mound may prompt A’s fans to envision, if not exactly a return to that era, at least marked improvement over the club’s downtrodden status of the last two seasons.

While Monday night’s 8-3 victory over the sizzling San Francisco Giants represented the first major league win for Mengden (pronounced MING-den), it was the fourth time he gave up three runs or less in his four starts since being called up June 11. He was the fourth pitcher since 1913 to lose his first three career games despite yielding so little damage, mostly because the A’s supported him with a meager total of two runs over that spell. On Monday they quadrupled that figure.

In tossing a personal-best 7 2/3 innings against the National League West leaders, Mengden retired the game’s first 13 batters and wound up allowing four hits and two runs, cementing the notion he’s here to stay.

“He can throw upwards of the mid-90s at times with some sink and has some off-speed stuff; nice gap between his fastball and his off-speed stuff,’’ Oakland manager Bob Melvin said of the youngster who has lent some stability to the club’s ramshackle rotation. “It’s just a good complement of pitches, and he looks like a guy who, the minute he got here, feels like he belongs.’’

And looks like he belongs in a different time, as if he was born four decades too late. Mengden, 23, first grew his now-signature mustache as a sophomore at Texas A&M as a way to one-up the facial hair or Aggies coach Rob Childress.

The over-the-head windup, which may include anywhere from one to three pumps, evolved out of necessity as he sought a way to snap out of a pitching slump while in college by combining elements from Dontrelle Willis, Andy Pettitte – both lefties – and Roger Clemens. The latter two pitched for the Astros, the team he grew up rooting for.

“Just throw it all together and see what happens, so I went over my head, had a big leg kick and started throwing. It ended up working out pretty good and I started throwing well, so I kept it,’’ said Mengden, Houston’s fourth-round pick in 2014.

“I feel like everyone tries to be as simple as they can just for mechanical sake, but I like doing it. I guess it’s my own flair. It helps my timing and gets everything going for me.’’

While the Astros had no issue with the mustache, they were not crazy about the retro pitching motion. He reincorporated it after being traded to the A’s, who are famously laissez-faire with players as long as they’re producing.

Mengden could not have done much better this season in the minors before his promotion, as he rode an uptick in his velocity and a sharper curveball to a 5-1 record with a 1.19 ERA in 11 starts split between Class AA and AAA.

Riddled with injuries and poor performances from their starters, who rank 27th in the majors in ERA at 5.03, the A’s decided to take a look at the young pitcher they acquired in the Scott Kazmir trade last July 23. He has responded with a 2.81 ERA and 26 strikeouts in 25 2/3 innings.

“He’s got a unique delivery which creates deception,’’ Giants manager Bruce Bochy said, “but he’s got velocity, he’s got movement on the fastball, he’s got a good overhand curveball and a cutter and changeup. He’s been pitching well.’’

Despite winning four of their last five, the A’s have trudged through a miserable June (9-14) and trail the AL West-leading Texas Rangers by 16½ games, only the third time in their history they have fallen so far behind this early in the season.

Melvin said youngsters who come up from the minors can inject a struggling team with renewed enthusiasm, especially when they perform like Mengden, whom he calls “a bit of a renaissance pitcher.’’

Such a quick career turnaround would never have occurred to Mengden that day less than a year ago when he and catcher Jacob Nottingham, his teammate with the Class A Lancaster (Calif.) JetHawks, walked across the field to join the team they were scheduled to play. They had just been traded to the Stockton Ports, the A’s affiliate in the California League.

After going 4-2 with a 4.25 ERA for the Ports, Mengden started this year at Class AA and was hoping to reach AAA by midseason, then perhaps earn a September callup. He moved up his timetable by turning back the clock with his pitching style.

“I guess it’s fate,’’ Mengden said of being sent to Oakland. “I had the mustache with the Astros and I got traded to the A’s and fit in perfectly with the Catfish Hunter-Rollie Fingers mix, as people say.’’