SAN DIEGO -- Right-hander Tyson Ross will never forget Yangervis Solarte's first start for the San Diego Padres at Petco Park.

Third baseman Solarte, who was acquired from the New York Yankees in the July 22 trade that sent third baseman Chase Headley to New York, threw out a runner at the plate then hit his second homer as a Padre to lead San Diego to a 3-1 win over the St. Louis Cardinals on Tuesday night.

Solarte's eighth homer of the season and a determined six-inning effort by Ross (10-10) allowed the Padres to snap a three-game losing streak in the opener of a six-game homestand.

Ross allowed one run on four hits and five walks with seven strikeouts to top Cardinals right-handed starter Lance Lynn (11-8), who allowed two runs (one earned) on four hits and three walks with six strikeouts over six innings.

The decisive run was produced by second baseman Jedd Gyorko, who drove home Solarte from second with a two-out single in the bottom of the sixth. It was Gyorko's second game back from the disabled list after missing 44 games with plantar fasciitis in his left foot.

"I needed the defense to make some great plays behind me and the offense to come through tonight and they did," Ross said after winning his third straight decision.

Ross has allowed two runs on 13 hits over 19 innings in his last three starts and finished July with a 4-2 record and a 1.10 ERA.

But he struggled Tuesday night, walking five of the first 12 Cardinals he faced.

"My fastball command has been better," said Ross. "(Catcher) Rene (Rivera) kept me under control. And the defense played great behind me. I just ground through it."

"He's been so good, phenomenal, that five walks were a little exasperating," Padres manager Bud Black said of Ross's effort. "He was a little out of sync early, which is very uncharacteristic. But he found the rhythm and righted the ship."

The Padres took a 1-0 lead in the third when Rivera reached second on a two-base scoring error by Cardinals second baseman Kolten Wong and scored on center fielder Alexi Amarista's one-out sacrifice fly to center.

But the Cardinals tied the game in the fifth and would have had more had it not been for Solarte's throw to the plate to gun down the go-ahead run.

Lynn opened the fifth with a single past Padres shortstop Everth Cabrera, moved to third on a double by third baseman Matt Carpenter and scored on a sacrifice fly by Wong.

Carpenter moved to third on the sacrifice fly and tried to score when the next hitter, left fielder Matt Holliday, chopped a ball that forced Solarte to come in and to his left. But Solarte threw a strike to Rivera, who tagged out Carpenter after the Cardinals dodged the initial tag.

"If he goes, I'm throwing home on that play," said Solarte. "And he went."

Solarte's second home run in seven games as a Padre was his eighth of the season. Since joining the Padres, Solarte is 8-for-28 with a triple and two homers for six RBIs and seven runs scored.

Tuesday's homer was a 342-foot drive down the line in right off Cardinals right-handed reliever Jason Motte to make it 3-1 in the seventh.

"That was a pretty good pitch," said Black. "Motte got it inside."

Cardinals manager Mike Matheny was disappointed his club didn't produce a win for Lynn.

"He pitched great and deserved better," Matheny said of Lynn, who departed the game with a 2.98 ERA.

"We ran into a guy (Ross) who is having a real nice season and threw the ball well tonight. Lance threw a great game for us tonight."

NOTES: The Cardinals released C George Kottaras, who was designated for assignment Saturday when C A.J. Pierzynski was signed. ... The Padres designated LHP Jason Lane for assignment a day after the 37-year-old held Atlanta to one run on six hits over six innings. ... The Padres activated SS Everth Cabrera from the disabled list. Cabrera had been on the DL since July 3 with a left hamstring strain. ... RHP Ian Kennedy, who missed his scheduled start Monday with a mild oblique issue, is expected to make his next scheduled start Saturday.