The Red Sox snapped a scoreless tie in the seventh off Mark Buehrle, who suffered the loss on a night he was effective.
"Buehrle pitched well enough to win once again," manager Ozzie Guillen said. "He pitched well, kept the team in the game. He had one bad inning with a couple bloopers here and there, one ball hit hard. He pitched well."
Buehrle (5-7, 3.41 ERA) limited the Red Sox to one hit through six innings, but in the seventh, the veteran ran into trouble.
After allowing a one-out single to Will Middlebrooks, Buehrle got Adrian Gonzalez to fly out to center. Kelly Shoppach, who entered the game 5-for-13 with three homers and seven RBIs off Buehrle, laced an RBI double to left-center field to score Middlebrooks easily from first.
"He's got me a lot," said Buehrle, who fell to 10-1 during Interleague Play. "That first double he got off me I came up to bat and I was laughing at him. I said, 'Ha ha, you didn't hit a home run off me.' I think he's got three home runs in 15 career at-bats or something.
"I said, 'Ha ha, you got a hit, but at least I kept you in the ballpark.' He joked around to make sure that whatever team he signed with that they were playing wherever I was at."
Still, Buehrle nearly was out of the inning when Aviles lifted a foul ball that went into the Red Sox's dugout. Catcher John Buck sprinted to the railing, but the ball bounced off his glove.
However, the ball nicked the wire that supports the large net behind home plate. Even if Buck held onto the ball, the umpires told him the catch wouldn't have counted.
"The umpire told me it would have been dead anyways," Buck said. "He said, once it hits the wire, it's dead. It wouldn't have mattered. I was mad, because I still almost caught it after it hit the wire."
A game of inches, Aviles was given new life. He took advantage.
Aviles slapped an RBI single to center and the Red Sox had all the runs they needed to bounce back after losing 4-1 on Monday.
The game was played with the roof and wall in left field open on a pleasant South Florida night. The outcome partly was decided by the wire.
Center fielder Chris Coghlan did his part in keeping it a 2-0 game when he robbed Clay Buchholz of a two-run hit by catching a sinking liner to center.
"Broken bat hits didn't go our way today," Buck said.
The Marlins' lone run came on Logan Morrison's homer off Buchholz to lead off the seventh inning. The blast to right snapped Miami's scoreless innings streak at 12.
The Marlins threatened in the eighth, putting runners on the corners with two outs. Omar Infante legged out an infield single, and Hanley Ramirez's flare to right put runners on first and third.
Veteran Vicente Padilla matched power with power against Giancarlo Stanton. On a 1-2 pitch, Padilla caught Stanton looking at a 95-mph fastball.
Stanton struck out in all four of his at-bats.
"Vicente has been terrific," Red Sox manager Bobby Valentine said. "That was just a mano-a-mano at-bat. He said, 'Here it comes. Let's see if you can hit it.' He wasn't backing down at all. He got the out we needed in the eighth."
For the second straight game, Jose Reyes led off the first inning with a triple. The difference on Tuesday is he was stranded.
Buchholz responded by striking out Infante, Ramirez and Stanton in order.
"We got a man on third base and no outs," Guillen said. "Yesterday we scored that run and today we did not. We have to take the opportunities. We faced a pretty good hitting team, a pretty good pitching team. We have to do that, I think. The way we were hitting, we need to take every opportunity we have and then take advantage of that. Today we did not do that."
The Marlins didn't have many opportunities off Buchholz.
In the third inning, Miami strung together three consecutive two-out singles. Reyes and Infante were on second and first, respectively, when Ramirez tapped a grounder up the middle. Ramirez beat Aviles' throw to first. Hoping to catch the Red Sox off guard, third-base coach Joe Espada gambled and sent Reyes home.
The aggressive move didn't work as Kevin Youkilis quickly threw home and Shoppach applied the tag, easily getting Reyes.
"The third-base coach sent me," Reyes said. "We think that maybe the shortstop, when he threw the ball off-balance, maybe he would bounce the ball. It didn't happen that way. They executed perfect."