Pittsburgh Pirates pitcher Felipe Vazquez was booked into a new prison this week ahead of a Wednesday hearing over one of his two child sex cases.

The 28-year-old MLB All-Star, who has been in custody a week, was moved from Pittsburgh’s Allegheny County Jail to Westmoreland County Prison in Greensburg on Monday, according to the Pittsburgh Post-Gazette.

Judge Rita Donovan Hathaway approved the move so the suspended star would be close to the court where he is due to be arraigned Wednesday afternoon for allegedly sexually assaulting a 13-year-old girl.

“The defendant shall not be released from custody under any circumstances,” Hathaway wrote in the order, according to the Tribune-Review.

The Venezuela-born Vazquez — whose nickname is “Nightmare” — allegedly admitted he had “sex but not really” with the young girl in August 2017, according to a criminal complaint.

He is accused of sexually assaulting her in his red Ford Mustang parked in the driveway of her home in Scottsdale, Pennsylvania.

Vazquez is charged with felony counts of statutory sexual assault, unlawful contact with a minor, corruption of minors, as well as a misdemeanor count of indecent assault of a person less than 16 years old.

He had been arrested initially on an arrest warrant from Florida, where he faces charges of solicitation of a child and providing obscene material to minors for allegedly sending the girl a video of himself in a sex act.

The two also allegedly exchanged nude photos and the victim sent him videos in which she performed sex acts on herself, according to court papers.

He was hit the same day with charges in the Scottsdale case.