ST. PETERSBURG, Fla. — Josh Beckett was a dribbler from being perfect.

The Boston righthander pitched the first one-hitter of his career Wednesday night, limiting the Tampa Bay Rays to Reid Brignac’s third-inning infield single in a 3-0 Red Sox victory.

“I felt good. They were hitting balls at guys, and that’s nice,” Beckett said after his fifth career shutout and first complete game since 2009. “When you miss your spot and they still hit it at somebody, it’s just one of those nights.”

Kevin Youkilis hit a three-run homer and Beckett retired the last 19 batters he faced in outdueling rookie Jeremy Hellickson, who matched the Boston starter out for out into the seventh inning.

Beckett struck out six and walked none while throwing 97 pitches to post his first shutout since blanking Kansas City 6-0 at Fenway Park on July 12, 2009. It was his 10th complete game, first since a 9-1, five-inning victory over the Rays at home on Sept. 12, 2009.

“That’s about as good as you can pitch,” Boston manager Terry Francona said, noting Brignac’s hit came on a low changeup that probably would have bounced if he had swung and missed.

“If it wasn’t for that little 3-iron out of the rough — that ball was about off the dirt,” Francona added. “He was tremendous. It was fun to watch.”

Beckett said as the game progressed he never thought about what might have been if Brignac had not reached base.

“No. Because it was a hit,” Beckett said. “It doesn’t matter who’s playing over there. It doesn’t matter how you draw it up. It’s a hit. It wasn’t a perfect game. It was a one-hitter.”

Youkilis homered off Hellickson (7-5) in the seventh, ending the young right-hander’s streak of consecutive innings without allowing a run at home to 24. The Red Sox were held to one hit before Dustin Pedroia tripled and AL batting leader Adrian Gonzalez drew an intentional walk to set the stage for Youkilis’ towering drive over the left field wall.

The loss dropped the third-place Rays 4½ games behind the Red Sox in the AL East. It was Boston’s first win in four games against Tampa Bay this season.

The teams conclude a three-game series Wednesday night, with right-hander Clay Buchholz facing lefty David Price in what could be another terrific pitching matchup.

“That why I think this (race) is going to go back and forth,” Rays manager Joe Maddon said. “I don’t see one team running away and hiding at any point.”

The Red Sox outscored opponents 83-36 during the longest winning streak in the majors this season, however they have generated few opportunities the past two nights against the Rays.

Gonzalez had three of the team’s five hits off James Shields in the series opener, all singles. Pedroia singled in the first for the first hit off Hellickson and Jacoby Ellsbury drew a fourth-inning walk, however both baserunners were erased on double plays.

Beckett was just as impressive.

The Boston right-hander retired eight straight before Brignac hit his slow roller up the third base line and easily beat the throw to first with two outs in the third. Beckett’s errant pickoff throw allowed Brignac to move into scoring position, however Johnny Damon struck out to end the inning.

“It was unbelievable. I don’t know how he hit that ball,” said Youkilis, Boston’s third baseman. “There was really no play on it.”

Damon finished 0 for 4, ending his franchise-record on-base (by hit, walk or hit by pitch) streak at 39 games — the longest stretch in the majors since Florida’s Logan Morrison’s streak of 42 games last season.

“He definitely had our number,” said Damon, who grounded to second base to end the game.

Notes: Republican presidential hopeful Mitt Romney was among the crowd of 19,388. … The Rays are two games into a stretch in which they will play 14 of 32 against the Red Sox and Yankees. … Francona said LHP Andrew Miller, currently at Triple-A Pawtucket, will not opt of his contract, which the pitcher could have done Wednesday. It’s likely Miller will be called up soon. … Red Sox SS Jed Lowrie was back in the lineup after missing two games due a sore left shoulder. … Francona doesn’t expect RHP Bobby Jenks (back tightness) will be ready to come off the DL when eligible next week. Jenks is currently throwing on level ground.

Yankees 12, Rangers 4

NEW YORK — Mark Teixeira hit two-run homers from each side of the plate and Curtis Granderson homered for the fifth time in seven games, powering the New York Yankees past the Texas Rangers 12-4 Wednesday night.

Youngsters Eduardo Nunez and Ramiro Pena homered as New York handed Texas its season-high fourth straight loss. Granderson also connected Tuesday night when the Yankees routed the AL champion Rangers by the exact same score.

In the second game without the injured Derek Jeter, Manager Joe Girardi got creative with his lineup. Batting leadoff for the first time since 2008, Nick Swisher reached base three times. Andruw Jones, starting in left field for Brett Gardner with left-hander Derek Holland on the mound, hit the tiebreaking RBI single in the fifth.

Granderson hit a three-run shot for his 22nd homer of the year. Francisco Cervelli added a run-scoring hit and made a gymnastic play at the plate filling in for catcher Russell Martin, out again with a stiff back.

For the second night in a row, the Yankees humbled a Rangers starter on a roll. They knocked around Alexi Ogando on Tuesday for six early runs in handing him his first loss off the season. This time, New York forced Holland to throw 103 pitches in giving up six runs in five innings. Holland (5-2) last lost April 16 at Yankee Stadium, 11 starts ago.

Rangers pitchers have given 70 runs in the last nine games, a 2-7 slide.

Teixeira homered from the right side in the first after Ivan Nova (6-4) gave up two quick runs to Texas. He connected on a deep drive to right from the left side off Mark Lowe in the sixth for his 21st home run of the season.

The Yankees first baseman tied Chili Davis and Eddie Murray for most times homering from both sides of the plate all-time with 11.

Nunez hit a tying homer in the fourth on his 24th birthday. Pena led off the sixth with his first of the year. New York has hit a major league-leading 103 homers. No other team entered Wednesday with 80.

Michael Young and Josh Hamilton had RBIs in the first to give the Rangers the early lead. Ian Kinsler homered leading off the third and Adrian Beltre had a sacrifice fly later in the inning to make it 4-3.

The Yankees took the lead for good in the fifth. Alex Rodriguez slid across home plate just ahead of catcher Yorvit Torrealba’s sweep tag on Jones’ hit to give the Yankees a 5-4 lead. Rodriguez tied Ted Williams for 16th all-time with 1,799 runs scored.

Cervelli then hit an RBI single but Nunez, who walked, was thrown out third to end the inning. Home plate umpire Mike Winters emphatically pointed at home several times to indicate Jones scored before the third out while Torrealba stood nearby with his hands up, questioning the call.

Granderson teamed up with Cervelli to protect the lead in the sixth. Granderson fielded Elvis Andrus’ single to medium center field and came up throwing. The strong throw was slightly off line but Cervelli forced Torrealba to the outside by blocking the plate with his left leg and he quickly dived backward to apply the tag for the third out.

Granderson hit a soaring homer in the eighth off Rangers closer Neftali Feliz, pitching for the first time in a week.

Nova gave up four runs and seven hits in 5 2-3 innings.

NOTES: The Yankees signed RHP Cory Wade to a major league contract and added him to the 25-man roster. New York had signed Wade to a minor league deal on Monday. They transferred setup man Rafael Soriano to the 60-day DL to make room on the 40-man roster. Wade pitched a perfect inning of relief. … Rangers RHP Brandon Webb (right shoulder surgery) threw 45 pitches of one-hit ball over three innings for Double-A Frisco on Sunday. Rangers pitching coach Mike Maddux said Webb was throwing 83-85 mph. He needs to be at about 85-87 he said. The 2006 Cy Young Award winner hasn’t pitched in the majors since April 6, 2009. He’s expected to make his next rehab start Sunday for Frisco. … New York Giants coach Tom Coughlin received a mix of cheers and boos when he was shown on the video board.

Reds 7, Dodgers 1

LOS ANGELES — It’s not that Andre Ethier is being singled out as the primary reason for the Los Angeles Dodgers’ recent swoon. The rest of the team shares equal blame for the team being a season-worst eight games under .500.

But Ethier undoubtedly has been one of the Dodgers’ most visible players the past few years, and that has put him under more scrutiny than most. Wednesday’s 7-1 loss to Cincinnati only underscored that fact, as the Reds completed their first three-game sweep at Dodger Stadium since 2004.

“Obviously we’re going to need production from Andre,” manager Don Mattingly said. “He needs to get good pitches to hit and hit the ball hard, and the results will be there. He does battle himself, I will say that. Andre’s a guy that gets frustrated and gets down on himself. I hope he’s not doing that now, because he’s got so much talent and such a great swing that you want him to just keep fighting.”

Ethier is hitting .250 with two homers, 15 RBIs and 29 strikeouts in 37 games since getting the final hit of his 30-game hitting streak on May 6. In his first 32 games, he hit .379 with three homers and 17 RBIs. He has gone six games (25 at-bats) since his last RBI and 18 games (66 at-bats) since his last home run.

“I don’t think there’s any explanation for it, other than the ebbs and flows during the course of the season,” said Mattingly, who was the Dodgers’ hitting coach the previous three seasons under Joe Torre.

“But the better players keep those lulls to a minimum. And that’s really what Andre has to do. At times you see him chase pitches. I know he’s got a good eye, but I’ve seen him chase that hard breaking ball down.”

The Reds won on manager Dusty Baker’s 62nd birthday. His teams are 5-11 on June 15 during his 18 seasons as a manager. It was a far cry from the last two times he was in uniform on his birthday. Last year, Reds lost 12-0 to the Dodgers at Cincinnati — and two years ago Boston routed them 9-0 at Great American Ball Park.

“It was a real nice birthday present,” said Baker, the former Dodgers left fielder. “It’s the first time I can remember winning a game on my birthday in about 10 years. That’s the one thing I wanted today. It’s rare to come in here and sweep the Dodgers. That was a perfect ending on this West Coast trip, which has really been a nemesis to most teams in the East.”

Scott Rolen led the way for Cincinnati with his first three-RBI game since April 6. He had a pair of run-scoring doubles and an RBI single, all against Chad Billingsley (5-6). Ryan Hanigan and Fred Lewis each had two RBIs.

It was the first time the Dodgers were swept at Chavez Ravine in a three-game series since June 12-13, 2010, when the Angels came up the freeway from Anaheim to bring a 23-7 surge by the Dodgers to a halt.

“When you don’t get the results, it’s discouraging. It’s discouraging for me and it’s discouraging for them,” Mattingly said. “You’ve got to keep believing that this thing’s going to turn, but it’s going to take everybody on this club being ready to play. These guys are definitely not quitting. I don’t see guys going through the motions. But we’re going to have to play solid baseball for a long period of time to get back in this thing.”

Billingsley (5-6) labored through four innings with 88 pitches. He allowed seven runs, nine hits and four walks.

“It’s unacceptable the way I’m pitching right now,” Billingsley said. “I’m just not executing some pitches in some situations. I just wasn’t very good today, and just have to come back out and get better and better. I’m going to keep working hard and figure it out. As far as my delivery and mechanics, I feel pretty good. I’ve been making mistakes up in the zone and out over the plate. I have to eliminate that.”

Travis Wood (5-4) allowed one run, five hits and five walks over six innings. He did not retire more than two batters in a row at any point.

Cincinnati took a 2-1 lead in the second with RBI doubles by Rolen and Lewis. The Reds made it 6-1 in the third on Rolen’s run-scoring single, a bases-loaded walk to Lewis and a two-run single by Hanigan.

Handed a five-run cushion, Wood promptly plunked Ethier with his first pitch in the bottom of the third — the first time Ethier was hit this season. But left fielder Jonny Gomes raced toward the foul line and made a diving backhanded grab across the line to rob James Loney of a two-run double.

“I definitely don’t play Loney on the line by any means ever,” Gomes said. “But Woodie had his cutter going and Loney kept fouling balls off to my side. So every pitch he threw, I took another step, and another step, and another step.”

NOTES: During his 19-year playing career with the Braves, Dodgers, Giants and Athletics, Baker was in the starting lineup on his birthday 10 times. He was 13 for 35 with two home runs and nine RBIs in those games, and his teams were 6-4. … The seven runs against Billingsley were one shy of the total he allowed over 42 innings in his six previous home starts this season. He came in 3-0 with a 2.25 ERA against the Reds at Dodger Stadium. … Rolen is 8 for 15 lifetime against Billingsley with five RBIs.