BALTIMORE (AP) – The only thing missing from a near-perfect weekend for the Baltimore Orioles was having Rafael Palmeiro get his 3,000th hit.

That didn’t matter much to Palmeiro, who took great delight in helping the Orioles charge into the All-Star break by taking three of four from the defending World Series champion Boston Red Sox.

Palmeiro and Jay Gibbons hit solo home runs to back a strong pitching performance by Rodrigo Lopez, leading the Orioles to a 4-1 victory Sunday.

Palmeiro’s homer off knuckleballer Tim Wakefield (8-7) was his third in three games. Palmeiro also hit a sacrifice fly, but his 1-for-3 afternoon left him two hits short of becoming the fourth player in baseball history to have 3,000 hits and 500 home runs.

“The hits are going to come,” he said. “The thing is, we were trying to get three out of four. I was able to contribute to that.”

Led by Palmeiro, the Orioles won on Thursday, Saturday and Sunday to move within two games of first-place Boston in the AL East. Baltimore entered the series having lost 11 of 13.

“This could have been devastating for us if we lost three out of four,” Palmeiro said. “We would have been six or seven games out.”

The Orioles resume play Thursday with a four-game series in Seattle, then travel to Minnesota and Tampa Bay, which means Palmeiro will almost certainly get his 3,000th hit on the road. He would have loved to have done it Sunday, but he came in 9-for-55 (.164) lifetime against Wakefield, so getting three hits might have been asking too much.

“I’m disappointed more for the fans. I wanted to do it so that they could be a part of it,” he said. “I’ll get it done. It’s just going to be away from here.”

Attendance at the game was 49,828, the largest crowd in the 14-year history of Camden Yards. All four games were sellouts, totaling 195,722 – the most for a four-game home series in Orioles history.

Lopez (8-5) gave up one run and three hits in eight innings. He struck out six, walked none and retired his final 14 batters to improve to 10-4 lifetime against the Red Sox.

Lopez had lost his previous three starts, including his last one against the New York Yankees, when he gave up 10 runs and 11 hits in three innings.

On this day, however, the right-hander virtually shut down an offense that was leading the majors in batting average (.283) and runs (472).

“This will give me more confidence, especially after those three bad outings,” Lopez said.

B.J. Ryan worked the ninth for his 19th save.

Trot Nixon homered for the Red Sox, and Johnny Damon beat out a ninth-inning bunt to extend his career-high hitting streak to 25 games.

Boston reached the All-Star break in first place for the first time since 1995, but the Red Sox would have preferred to put a more positive finish on a solid first half.

“I’m not happy we lost today. We’re never too happy about that,” Boston manager Terry Francona said. “I wish our record was a little bit better. I guess everybody does.”

Wakefield, who gave up four runs and nine hits in seven innings, lost for the first time since June 6. He was 4-0 in his previous five starts.

“I made one bad pitch to Gibbons. I felt great,” Wakefield said. “I could have pitched extra innings.”

Gibbons put the Orioles up 2-1 in the fifth, ending a 3-for-25 skid with his 13th homer.

Palmeiro hit his 15th home run, the 566th of his career, in the sixth. After he reached the dugout, the crowd asked for a curtain call – and got it.

“It felt great,” he said.

Singles by Luis Matos, Gibbons and Sal Fasano made it 4-1 in the seventh. That was enough offense for the Orioles, who are 7-5 against Boston this season.

Nixon staked the Red Sox to a 1-0 lead in the second with his ninth homer, a drive to right on a 2-2 pitch. It was Boston’s only home run in the four-game series.

Baltimore tied it in the fourth. Melvin Mora hit a leadoff single, took third on a double by Miguel Tejada and scored on Palmeiro’s deep fly to center.

“I wasn’t just trying to get hits. I was trying to be productive,” Palmeiro said. “I’m hitting cleanup.”

Notes: Nixon’s homer was his 121st with Boston, tying John Valentin for 20th on the team’s career list. … The Orioles won their first series since June 17-19, against Colorado.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.