HOUSTON — Chris Carter homered twice, including a go-ahead three-run shot in the seventh, to back seven strong innings from Bud Norris and give the Houston Astros a 4-1 win over the Tampa Bay Rays on Wednesday night.

The victory breaks a five-game skid for the Astros, who had been shut out in their last two games.

Carter broke a 22-inning scoring drought for Houston with his solo homer in the second off Roberto Hernandez (4-10) that tied it 1-1. He connected on a full-count pitch from Jake McGee on his second home run to make it 4-1 in the seventh.

Carter leads the Astros with 17 homers and his 44 RBIs are tied for the team lead.

Norris (6-7) allowed six hits and one run with five strikeouts to break a three-game losing streak and pick up his first win since June 1. Jose Veras allowed a hit in a scoreless ninth for his 17th save.

Hernandez allowed four hits and three runs in six-plus innings for his fourth consecutive loss.

James Loney had two hits to extend his hitting streak to 14 games and Ben Zobrist drove in Tampa Bay's only run with a sacrifice fly in the first.

Carter's homer in the second pinged off the facade on the wall above the Crawford Boxes in left field, giving the Astros their first earned run in 31 innings.

It also broke a team record-tying 24-inning scoreless streak for Rays pitchers. It was the third time in team history they'd reached the mark.

Jose Altuve singled with two outs in the third, but was caught stealing second to end the inning. Hernandez starting rolling after that and retired the next nine straight.

He ran into trouble in the seventh when Brett Wallace doubled with no outs before he was chased by a single from Jason Castro. He was replaced by McGee, and Carter sent his 98 mph fastball to the train tracks atop the wall in left field. It was Carter's second multi-homer game of the season and of his career.

Norris hasn't had much run support lately, with the Astros scoring just three runs combined in his last three losses. A relieved-looking Norris greeted Carter with a hug and a huge smile in the dugout after his homer put Houston on top.

The Rays, who had scored 20 runs in the last two games combined, had trouble stringing together hits against Norris.

Their best chance to add to their run total came in the fifth. Jose Molina's comebacker sailed just inches above Norris's head for a single to start the inning. Norris then struck out Yunel Escobar and Molina was caught stealing second on the play. Norris walked consecutive batters, but escaped the jam by retiring Zobrist for the third out.

Escobar singled with one out in the seventh before Jennings grounded into a double play to end the inning.

NOTES: The series wraps up Thursday when Tampa Bay's Chris Archer opposes Jordan Lyles. ... Houston DH Carlos Pena was back in the lineup after taking time to travel to the Dominican Republic following the drowning death of his nephew. He returned to the team on Tuesday after missing two games, but did not play. Pena said it was a difficult time for his family, but the support the team showed him made it a bit easier. "We have a lot of signs around here that we have family first and that's something that I saw firsthand, how they reacted to this situation," Pena said. "They did everything they could to make sure my family was all right and taken care of, which I appreciate."... Evan Longoria was Tampa Bay's designated hitter for the second straight game after missing the previous three games with plantar fasciitis in his right foot. Manager Joe Maddon said he doesn't know when the All-Star third baseman will feel good enough to play defense, but that's OK with him. "We'll just have to wait to get him on the field, but we have him as a DH we'll take it," Maddon said.