Upon becoming a closer two years ago for the out-of-contention Kansas City Royals, Ian Kennedy imagined what it would be like to pitch the ninth inning in the pressure cooker of a playoff race.

Getting booed off a mound in Philadelphia after yielding back-to-back home runs wasn’t part of the fantasy.

One strike from closing out a precious late-season Phillies victory Thursday night, Kennedy hung a curveball to Ryan McMahon and a fastball to Sam Hilliard, turned a one-run lead into a 4-3 loss to the Colorado Rockies, and sparked anew an annual September debate: Who should be the closer?

“We look at it every day,” manager Joe Girardi said after the Phillies blew their 30th save, most in the majors. “But, I mean, he’s our closer.”

Never mind that Kennedy has allowed six home runs in 13⅔ innings for the Phillies since being acquired in a July 30 trade with the Texas Rangers, for whom he gave up five homers in 32⅓ innings. Or that his second blown save in eight chances, coupled with the Atlanta Braves’ 10-inning, 7-6 victory over the Washington Nationals, dropped the Phillies to 3½ games back with 22 games remaining.

Girardi said he isn’t ready to make a change in the ninth inning.

“He’s had some big saves for us, too, and some tough saves for us,” Girardi said of Kennedy. “Just tonight, I mean, he was one strike away. He got the first two guys out and executed pitches, and then after that he didn’t. I don’t think that he’s not capable of doing it because I’ve seen him do it. He just didn’t do it tonight.”

Kennedy was unavailable for comment. But his body language after trying to sneak a two-strike curveball by McMahon said it all. He turned his head, looked skyward, and put his hands on his knees as McMahon’s line drive settled into the right-field bleachers for a go-ahead two-run homer.

Hilliard followed with a second-deck homer to right to give the Rockies a 4-2 lead. The Phillies cut the deficit to one run in the bottom of the ninth, but with the tying run on third base, pinch-hitting J.T. Realmuto struck out.

Girardi didn’t question Kennedy’s pitch selection to McMahon but instead said it was “just bad execution.”

“Just mistakes in the middle,” Girardi said. “You look at the curveball he threw. It looks like it’s almost middle-middle from where I’m sitting. It’s just been mistakes over the plate that have really cost him.”

Kennedy’s blowup also wasted another homer from Bryce Harper, a.k.a., the hottest hitter on the planet.

“It hurts. A lot,” Girardi said. “But we can’t change it. We’ve got to come out, play better tomorrow and find a way to put a streak together.”

Suárez is solid

Five nights after being pulled after five scoreless innings in Miami because of tightness in his left triceps, Ranger Suárez yielded one run in six innings and gave the Phillies the peace of mind that Girardi insisted he had all along about the No. 4 starter.

“I felt much, much better than my last time out,” Suárez said through a team translator. “Arm felt real, real good.”

Suárez gave up one hard-hit ball, a leadoff triple in the fourth inning to Trevor Story, who scored the tying run on a two-out single by rookie Colten Welker. Otherwise, he was efficient and effective. His velocity, which dipped against the Marlins, was back to normal. His signature sinker, for instance, averaged 93.2 mph, a tick higher than his 93 mph season average and up from 91.4 mph last Saturday.

“I was able to move my arm more like a whip motion,” Suárez said. “That definitely helped me and allowed me to do more things.”

Harper does it again

Before the game, Girardi conceded that some teams may choose to pitch around Harper — or even walk him intentionally — down the stretch. Then again, out-of-contention clubs like the Rockies may be more inclined to go right after him.

Rockies starter Antonio Senzatela challenged Harper in the first inning. After getting ahead in the count with 96-mph fastballs, he tried to make him chase sliders off the plate. Harper laid off and worked the count full before fouling off a 97-mph heater.

The next pitch was a down-and-away slider. But it clipped the outer corner of the strike zone, and Harper launched it into the first row of the left-field bleachers for his 30th homer of the season to open a 1-0 lead.

Harper became the third player with three 30-homer seasons since 2018, joining Max Muncy of the Los Angeles Dodgers and Nelson Cruz of the Tampa Bay Rays. Five players are within six homers of joining the club.

Oh, Odúbel

Odúbel Herrera got the Phillies’ go-ahead rally started in the sixth inning by pushing a bunt down the third-base line for a leadoff hit. Then, he nearly ended it by making the first out at third base.

Herrera tried to advance from first to third on Jean Segura’s single to right field. But he appeared to stumble around second base and barreled into third. Rockies right fielder Yonathan Daza made an accurate peg to third baseman Welker, who tagged Herrera on the arm.

One batter later, Harper lined a single off the right-field fence that likely would have scored Herrera from second base if only he had stopped there.

“That inning has a chance to be a lot different if it’s first and third, nobody out,” Girardi said.