Astros general manager Jeff Luhnow said Gonzalez will be allowed to regroup with the RedHawks.

The organization believes the second-year player is “going to be around for a while.” But Gonzalez’s batting average had fallen to .230 and he held just a .589 OPS after a hot early-season start, and he committed his eighth error in Sunday’s loss.

“He’s been struggling a little bit over the course of the last month,” Luhnow said.

Gonzalez, 24, was splitting time with veteran Ronny Cedeno at shortstop, while serving as Jose Altuve’s backup at second base. With Gonzalez’s demotion, the Astros need a replacement middle infielder.

Luhnow wouldn’t reveal the player who’ll be added to the club

“We do need another backup middle infielder, but that’s all I can say about it right now,” Luhnow said.

Elmore is the most likely to receive a call; the club doesn’t plan to rush Villar.

Luhnow praised the 5-9, 185-pound Elmore’s brief three-game run with the Astros while Altuve was on the bereavement list.

Elmore was 4-for-11 in mid-May, and the GM recently said Elmore was at the top of the club’s AAA promotion list. Elmore, 26, is comfortable playing shortstop and second base and was primarily a shortstop during his tenure with the Arizona Diamondbacks.

Villar ranks as a top-10 prospect but has struggled with offensive consistency and was disappointing during spring training.

“Towards the end of the year, if we feel like (Villar’s) a guy who needs to get some exposure to big league pitching, we’ll do that,” Luhnow said in May. “But really the focus is more on next year than this year. But we’ll handle that as we get later in the summer.”

Villar, 22, is hitting .271 with seven home runs and 34 RBIs and has a .753 OPS during 73 games with the RedHawks.