PITTSBURGH (AP) — In what’s quickly become a lost season for the Cincinnati Reds, this really was the ultimate misery.

Prized rookie Hunter Greene and reliever Art Warren combined to allow zero hits in a complete game, but it didn’t count as a no-hitter — or even a win.

Instead, the Pittsburgh Pirates eked out a run in the bottom of the eighth inning on three walks and a groundout for a 1-0 victory Sunday.

“It would have been great to have a different result, but it is what it is,” Greene said.

Ke’Bryan Hayes’ RBI grounder helped the Pirates become the sixth team in big league history since 1901 to win despite not getting any hits. It last happened in 2008 when Jered Weaver and Jose Arredondo of the Angels lost while holding the Dodgers hitless.

By Major League Baseball record-keeping rules, Cincinnati’s accomplishment isn’t an official no-hitter because its pitchers didn’t go at least nine innings.

“Sometimes you win games in weird ways and today we won one in a weird way. And if it’s a part of history, that’s fine because it’s still a win,” Pirates manager Derek Shelton said.

And in a year in which most everything has gone wrong for the Reds, this surely had to be the topper as they fell to 9-26, the worst record in the majors.

Greene (1-6) was pulled after one-out walks in the eighth to Rodolfo Castro and Michael Perez. The 22-year-old righty threw 118 pitches, the most by any pitcher in the majors this year.

“He had no-hit stuff and it translated,” Shelton said.

Greene fired seven heaters at 100 mph or faster, and mixed in sharp sliders and effective changeups. He struck out nine and walked five.

He was totally aware of the possible no-hitter, too.

“To be honest, like in the third or fourth. But that’s the last thing I wanted to think about (because) it is really hard to just stay locked in and not think about those things,” Greene said.

“I had the scoreboard right in my face and I was trying not to make eye contact with it,” he said. “Everybody was giving me my space and knew that I was locked in.”

Toward the end, he admitted, he was out of gas.

“But then again, there’s the mental part of, you know, ‘I’m fine. I’m not tired,’” he said.

Said Reds manager David Bell: “Looking at it now, I think it would have to have gone really easy for him to go back out there for the ninth, but I think there was a chance he could have done it.”

Warren relieved and walked Ben Gamel to load the bases. Hayes followed with a grounder to second baseman Alejo Lopez, who bobbled the ball before throwing to shortstop Matt Reynolds for a forceout. Reynolds’ relay for a potential inning-ending double play was a fraction late to get the speedy Hayes at first base.

“Maybe in a perfect world that ball’s hit a little bit harder to make it a little bit easier for him,” Warren said. “I tried to do the best I could and get a ground ball there. It’s just one of those things where it didn’t go our way.”

Cincinnati batters then went down in order in the ninth and that was it at PNC Park — no celebration for the Reds despite the zero in Pittsburgh’s hit column.

“I mean, to not even get a hit in a game and to get a win, I’m sure that hasn’t happened a lot since baseball’s been going on,” Hayes said.

There have been two no-hitters in the majors this season. Angels rookie Reid Detmers pitched one last Tuesday against Tampa Bay, and five Mets pitchers combined to hold Philadelphia hitless last week.

Also, Tampa Bay pitchers combined to hold Boston hitless into the 10th inning last month and wound up winning 3-2. That wasn’t an official no-hitter, either, because the Rays didn’t throw a complete game without giving up a hit.

The second overall pick in the 2017 amateur draft, Greene suffered an injury in 2018 that required Tommy John surgery in 2019. After the COVID-19 pandemic, he didn’t return to minor league play until 2021. He made the Reds’ roster for the first time coming out of spring training this year.

In his second start of the season, he set an MLB record with 39 pitches over 100 mph, but carried a 7.62 ERA into Sunday’s game thanks in part to majors-leading 11 home runs this season. He has also allowed 15 walks in 26 innings.

“I’m not focused on wins or losses this year. That’s not my focus,” he said. “You’ve got to embrace all the thoughts and emotions in that moment and just go out there and have fun. Hopefully, I’m going to have a lot more opportunities for that.”

Pirates starter José Quintana held the Reds scoreless through seven innings, giving up three hits while striking out five.

“Greene threw really well. That’s tough, tough for him. But we kept pushing,” Quintana said. “I’ve never seen that before but it’s great to get the win.”

Chris Stratton (2-1) pitched around a two-on, one-out jam in the eighth. David Bednar worked a clean ninth for his seventh save.