SAN DIEGO (AP) — The San Diego Padres' day began with news that manager Bob Melvin will have prostate surgery and ended with a thrilling win against the Chicago Cubs.

Manny Machado hit a go-ahead double in the sixth inning and left fielder Jurickson Profar caught Frank Schwindel's bases-loaded drive at the wall to seal a 5-4 victory Tuesday night.

Closer Taylor Rogers allowed Ian Happ’s RBI single with two outs in the ninth and loaded the bases before retiring Schwindel for his 12 save in 13 chances.

“These are the days you go through and thankfully we had an extra insurance run to play with," Rogers said. "He said he thought Schwindel's ball might go out, “but Profar's reaction, I thought maybe we had a chance and thankfully we did.”

Said starter Mike Clevinger, who pitched at Petco Park for the first time since late in the 2020 season: “I had my stomach in my throat but it’s all good.”

Melvin announced before the game that he'll have surgery Wednesday. He said he doesn't think he has cancer, “but they won’t know until they get in there.” Melvin, hired away from Oakland on Nov. 1, said he expects to miss at least a week's worth of games. Bench coach Ryan Christenson will serve as interim manager.

“It really makes you appreciate where you are, what you're doing right now,” Clevinger said. “There's a lot of things bigger than this game. We're all here supporting Bob and we wish him the best tomorrow.”

Rogers allowed Ian Happ's RBI single with two outs in the ninth and loaded the bases before Profar caught Schwindel's drive.

Clevinger pitched well for 4 1/3 innings in his first start at Petco Park since late in the 2020 season. He missed last season while rehabbing after Tommy John surgery. Chicago's Wade Miley lasted three innings in his Cubs debut, which was delayed due to elbow inflammation.

Machado and Eric Hosmer have been carrying San Diego's often-anemic offense all season and they came up big in the sixth. Machado doubled down the left field line off Chris Martin with two outs to bring in Jake Cronenworth with the go-ahead run. Hosmer then singled in Jurickson Profar, who had singled in front of Machado.

Steve Wilson (3-0) got the win and Robert Gsellman (0-1) took the loss.

The Cubs had tied it at 2 in the third on a two-run home run by Alfonso Rivas that bounced out of rookie center fielder Jose Azocar’s glove and over the fence. It was the second for Rivas, who grew up in nearby Chula Vista and went to La Jolla Country Day.

Azocar was starting in place of Trent Grisham, who won a Gold Glove in 2021, because the Padres were facing a lefty. Azocar slumped to the ground in disappointment after the play. The ball might not have gotten out without the redirection.

Austin Nola gave the Padres the lead back on an RBI single in the third before his throwing error in the fifth allowed Rafael Ortega to tie it at 3.

Clevinger, his long hair brained into pigtails, allowed three runs, two earned, and six hits in 4 1/3 innings while striking out six and walking two. It was the first time Clevinger's unorthodox delivery — which starts with happy feet and ends with a sweeping motion with his right leg — was on display in San Diego since Sept. 23, 2020.

Back then, fans weren't allowed in due to the pandemic.

“It was exciting,” Clevinger said. “It was really fun to be out there with fans. I hadn't gotten to experience that yet. It's was even louder being out there than in the dugout. I really appreciated it.”

Clevinger was obtained at the trade deadline during the pandemic-shortened season in a blockbuster trade with Cleveland. He exited his last start of the regular season with what was later described as an elbow impingement and missed the Padres' wild-card series win against St. Louis.

Clevinger returned for the NL Division Series opener against the Los Angeles Dodgers but was removed in the second inning after his velocity dipped dramatically. The Padres were swept by the Dodgers. He had Tommy John surgery later that fall.

The right-hander started this season on the injured list with a sprained right knee and made his debut with 4 2/3 innings of four-hit ball in the first game of a road double-header against his old team, the Cleveland Indians.

Miley allowed three runs and five hits in three innings. The Cubs picked him up off waivers from Cincinnati in November. Miley allowed Wil Myers' RBI single in the first and then walked Kim Ha-seong with the bases loaded.

A FRIARS FIRST

Former San Diego State softball player Brittany Womack became the first female official scorer in Padres' history and the eighth in big league history. She's a math teacher and baseball coach at Escondido High.

TRAINER'S ROOM

Cubs: Activated Miley from the 10-day injured list. Placed OF Michael Hermosillo on the 10-day injured list, retroactive to Sunday, with a left quadriceps strain. ... OF Seiya Suzuki was scratched from the lineup with a sore right ankle but singled as a pinch-hitter in the ninth.

Padres: Reinstated RF Myers and DH Luke Voit from the 10-day IL. Optioned INF CJ Abrams to Triple-A El Paso. Designated OF Trayce Thompson for assignment.

UP NEXT

The Cubs haven't named a starter for the series finale Wednesday afternoon while LHP Nick Martinez (2-0, 1.71) is scheduled to start for the Padres.

___

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports