Updated

The Philadelphia Phillies already led when they loaded the bases with none out in the second inning against Josh Johnson.

One big hit would mean a cushy lead for Roy Halladay. But the Phillies couldn't get it.

Johnson escaped the jam, and the Florida Marlins rallied to beat Halladay and the Phils 2-1 Tuesday night.

"You have a guy on the ropes," Phillies shortstop Jimmy Rollins said. "That would have been a good way to blow the game open. We didn't take advantage."

Mistakes and missed chances hurt the Phils. They stranded 10 runners and went 0 for 6 with runners in scoring position, and Rollins' error led to an unearned run that put Florida ahead.

Halladay's walk to Johnson in the third also proved pivotal. Johnson later scored the Marlins' first run.

"The walk definitely cost me," Halladay said. "You can't afford to do that. I was definitely not thrilled about it."

Johnson didn't get the win. But he kept his team in the game against the reigning NL Cy Young Award winner, pitching seven innings and allowing only one run — Ryan Howard's eighth homer leading off the second.

After the tense second inning, he loaded the bases again in the third but escaped.

"It seemed like I kept getting behind guys," Johnson said. "You've got to find a way to battle."

Chris Coghlan's single in the eighth drove home the tiebreaking run. Halladay (5-2) gave up only five hits in eight innings, but fell to 1-3 in his four matchups against Johnson.

"I'm kind of hoping he goes and plays somewhere else," Halladay said.

The loss ended Halladay's streak of wins in 13 consecutive starts against NL East teams since July 5, 2010.

He was pitching in Miami for the first time since last May 29, when he threw his perfect game. Johnson was the losing pitcher that night.

The rematch drew an announced crowd of 21,955, including a large walk-up turnout.

"This game came as advertised," Marlins manager Edwin Rodriguez said. "I think the fans had a lot of fun."

When Halladay walked Johnson on a 3-2 pitch to start the third, it led to the tying run. The walk was only the eighth issued by Halladay all season.

"A great at-bat — one of the best at-bats in the game," Rodriguez said. "J.J. should be very proud of that."

Johnson sprinted to third on a double by Coghlan and scored on Emilio Bonifacio's sacrifice fly.

The Phillies lost for only the fourth time in their past 22 games in Miami. Florida closed to within two games of the NL East leaders with the final game of the three-game series Wednesday.

Halladay had retired 13 consecutive batters when Rollins bobbled a grounder by Omar Infante for an error to start the eighth.

"With those two pitchers, the team is waiting for any advantage, any edge," Rodriguez said. "That's what happened."

When Halladay threw his first wild pitch of the season, Infante took second. He advanced to third on a groundout and came home on Coghlan's hit.

Leo Nunez retired Shane Victorino on a grounder with a runner at second to end the game and earn his 12th save in 12 chances. Mike Dunn (3-2) pitched a perfect eighth for the win.

Philadelphia had seven baserunners in the first three innings, but only one scored. With the Marlins aligned in a shift, Howard went the other way on a 3-1 fastball and homered to left.

"I made a terrible pitch to Howard and paid for it," Johnson said. "That's what he's good at."

The Phils went on to load the bases that inning, before Johnson struck out Dane Sardinha and Halladay and retired Rollins on a groundout.

"We had chances and we couldn't do it," Phillies manager Charlie Manuel said. "It's a tough way to lose."

NOTES: Philadelphia 2B Chase Utley (right knee) began a rehabilitation assignment Tuesday with Single-A Clearwater. ... Phillies RHP Joe Blanton, who came off the disabled list Monday and pitched five innings in a win over Florida, complained of some soreness in his throwing elbow but is scheduled for a bullpen session Wednesday. ... Phillies RHP Roy Oswalt (back), who is on the disabled list, threw a bullpen session and is expected to make a rehabilitation start Thursday for Clearwater. ... Marlins RHP Edward Mujica, carted off the field Monday with a strained left knee, said the injury was not nearly as serious as he first feared. He hopes to be available Friday. ... Johnson had his first hit batter and first intentional walk of the season.