SAN FRANCISCO — Early Friday evening, San Diego Padres manager Bob Melvin was telling the assembled media how “miserable” it was to spend a week watching his team while recovering from prostate surgery.

That was before he watched San Francisco Giants fans throw things at his left fielder and before he watched his team blow a pair of leads and almost cough away another in extra innings.

“They’ve been doing it all year,” Melvin said of his team. “We’ve played so many close games and we’ve lost some really tough games and responded the next day. To have a nice lead, to have what feels like a nice lead at the time, a broken-bat single ties the game, now all of a sudden it’s a new ballgame again, to come back and put two up right away like that just shows you what this club has been about all year.

“It’s great to see and we can keep developing that personality as the season goes along, but it’s not easy to do.”

The Padres used a four-run third to take a 4-1 lead. Jake Cronenworth hit a two-run homer to key the inning. However, Darin Ruf hit a pair of home runs off Sean Manaea, the second coming in the fifth and tying the score at 4.

Away from the scoreboard, San Diego left fielder Jurickson Profar somehow became a target for the fans in the bleachers. At least two baseballs were thrown at him and at least one beer bottle. The incidents led to a delay in the game as Manny Machado had crew chief Ted Barrett go out to left field to try to find the offending parties.

Profar said he had tried to throw a between-innings warmup ball into the stands to a San Diego fan.

“I think he missed it, and when some Giant fan caught it, I turned around ready for the pitch to be thrown, he threw it back and almost hit me,” Profar said. “I threw it back and then they start throwing more. The next time, they threw a beer bottle.”

The fans began booing Profar at a Machado-level for the rest of the game. Profar ended up with three hits, including one that drove in Machado for the second run in the 10th inning. He also had a stolen base.

Profar deflected any suggestion that the incidents fired him up and led to his hits.

“No, no, as a team, we’re always trying to win,” he said. “Those things didn’t affect [it].”

Profar said he was fine with the things fans say, but that throwing objects at players was a different thing.

San Diego went back up on a two-run double from noted Giant-killer Wil Myers in the eighth to make it 6-4. But the Giants rallied back again, getting two runs off Luis García in the ninth when Melvin didn’t want to use closer Taylor Rogers on back-to-back days. García struck out the first two hitters, then allowed a single to Mike Yastrzemski and a pair of walks. Wilmer Flores then sent a flare out to left field to tie the game.

But the Padres didn’t wilt. Cronenworth started the 10th as the automatic runner and Machado immediately doubled him in. One out later, Profar singled in Machado. San Francisco fans had booed with all their hearts when each one came to the plate. For naught.

Robert Suarez came on to nail down his first career save. Brandon Crawford did single in Tommy La Stella for one run but Suarez shut the door.

“That was huge,” Manaea said. “This team has got that fight. That was amazing.”

The team now has a chance to win its first series in San Francisco since taking three of four at the end of the 2020 season. It also clinched a winning nine-game road trip and will be no worse than alone in second place in the National League West when it returns home after Sunday’s game.

The Kansas City Chiefs are 2019 NFC Champs - get your gear on at Fanatics