SAN DIEGO - Although it is still early July, the importance of the San Francisco Giants' improbable win wasn't lost on the club.

Brandon Belt hit a two-run homer in the 10th inning, one inning after Michael Morse tied the game with a solo shot, to give the struggling Giants a 5-3 win over the San Diego Padres on Saturday night.

The comeback win wasn't only unlikely, given that the Giants have scuffled offensively for nearly two weeks, but it was also unexpected because they rallied against Padres closer Huston Street, who has been nearly unbeatable for more than a year.

"We have been in a tough rut here," Giants manager Bruce Bochy said. "Morse saved us, he saved our skin. You don't think that you're going to hit rock bottom, but that was a possibility today."

The Giants came in having lost 18 of 23 games, and had dropped 11 games in the standings to fall out of first place in the NL West behind the Los Angeles Dodgers.

The dramatic win is the spark the Giants hope will lift them from their funk.

"Hopefully, this is some kind of momentum that we need," said Giants starter Tim Hudson. "We've needed a win like this for a while. Hopefully, this is the start of something better than what's been going on."

San Francisco had been shut out in three of its previous five games and had scored more than two runs in just two of 11 games.

Belt, in his second game back from the disabled list, homered off Dale Thayer (3-3) after Hunter Pence legged out a double to lead off the inning. Belt, who missed 50 games with a broken thumb, hit his 10th homer of the season into the right-field stands.

"It felt good, sounded good, made me feel good," Belt said. "I was just happy because we needed a big hit. It was an exciting moment. It was nice to do something out there."

Before he homered, Belt was hitless in seven at-bats with one walk in his return.

Morse gave the Giants a huge lift with his homer leading off the ninth inning against Street to tie it 3-3. That broke Street's streak of 23 consecutive saves, the longest run in the majors.

"His reaction was like it was a walkoff homer to win Game 7 of the World Series," Hudson said about Morse. "We haven't had that fun, that excitement, that youthful exuberance in a while."

Morse's homer was just the second blown save for Street since May 2013. The righty had converted 48 of 49 chances in that time.

"It's not about the streak," Street said. "It's never about the streak. Tonight was just one blown save, one bad pitch. We had a win if I made a good pitch."

Sergio Romo (4-3), recently demoted from the closer role, earned the win. Santiago Casilla got the final three outs for his second save in five chances.

San Diego's season-high, five-game winning streak was snapped.

After Joe Panik's sacrifice fly put San Francisco ahead 2-1 in the seventh, the Padres scored two runs in the bottom of the inning.

Yasmani Grandal doubled with one out off of Jean Machi and scored the tying run on Jake Goebbert's triple into the right-centre field gap. Cameron Maybin followed with a sacrifice fly that easily scored Goebbert.

Hudson had his second strong outing to break a three-start losing streak. Hudson gave up one run on three hits over six innings and avoided matching his career high for losses in consecutive starts. He struck out four and didn't walk a batter.

The Padres tied it in the sixth on Seth Smith's sacrifice fly with one out after consecutive singles by Brooks Conrad and Alexi Amarista to open the inning.

Gregor Blanco hit his first homer of the season to give the Giants a 1-0 lead in the second.

Cuban defector Odrisamer Despaigne made his third career start for San Diego since being called up from the minors last month. The 27-year-old right-hander, who beat the Giants in his major league debut on June 23, wasn't as sharp this time.

He overcame four walks and allowed one run and two hits over six innings, his shortest outing. In three starts since coming up from the minors, Despaigne has an ERA of 1.41.

San Francisco third baseman Pablo Sandoval left the game in the first inning with a bruised left elbow after he swung and missed a pitch that hit him.

NOTES: San Diego was the only team that hadn't blown a lead after seven innings this season, going 29-0. ... Pence extended his hitting streak to 10 games with an infield single to open the game. ... The Padres have given up three homers in a game only twice this season, second lowest to the Chicago Cubs (1). ... Giants RHP Tim Lincecum (7-5, 4.06 ERA) will face Padres RHP Jesse Hahn (4-1, 1.95) in Sunday's series finale.