After a shaky first inning, Sanchez (2-1) settled and gave the Marlins seven solid frames. The right-hander allowed three runs on six hits.
"He threw good enough to win the game," Marlins manager Ozzie Guillen said. "That's the way I look at it. We just struggled at the plate. He knows he gave us a chance to win, keep the game very close. As a pitcher that's all he can do. You can't control anything else. Anibal controlled what he had to control. Too bad we didn't score for him."
All seven of Sanchez's appearances this year have been quality starts, meaning at least six innings with no more than three earned runs.
Monday was the first time he allowed as many as three runs.
"That happens sometimes," Sanchez said. "It's part of baseball. The good thing is the team continued to play good. ... I made a couple mistakes, stayed behind in the count. I gave up a home run at 2-0, but I feel good. I feel good, I'm positive. I'm going to continue to work out and get ready for another start."
The Marlins and Phillies are tied for the MLB lead in quality starts with 27.
Sanchez has five straight starts of seven innings, and his ERA is 2.06 over the stretch. Yet, he is 1-1 in the span.
"What can I do?" Sanchez said. "Just continue to pitch good. Just waiting for the run support and that's it. I don't got a problem with that, because they want to make some runs. They want to hit. I never got complaints about the hitters not giving me run support. I just try to make good games and wait for it."
Hanley Ramirez homered in the first inning. Rod Barajas answered with a shot in the second inning for the Pirates.
The Marlins were 1-for-8 with runners in scoring position, and they left six on base.
Because Erik Bedard is dealing with back spasms, Lincoln made his first start of the season. The right-hander had appeared eight times in relief, and he was expected to throw around 60 pitches. Lincoln gave the Pirates 80 pitches, and limited the Marlins to two runs on four hits.
"Any time you lose the game, it's tough," Jose Reyes said. "We had some opportunities, but we weren't able to get it done. The starter for them pitched a very good game. You have to give some credit to their guy. He had a good fastball and a good breaking ball. He threw strikes. He pitched a good game."
The Marlins had a chance in the eighth inning off Jason Grilli. Reyes singled, and on a hit-and-run, went to third on Ramirez's single to right. With runners on the corners and one out, Logan Morrison struck out and Giancarlo Stanton lifted a soft popout to second.
"That's not easy work to get the last two guys that he did over there in Morrison and Stanton," Pirates manager Clint Hurdle said. "To be first and third with one out and those two guys up and get them was big for us."
Joel Hanrahan threw a perfect ninth for his seventh save in eight chances.
A one-out single by Andrew McCutchen in the sixth inning positioned the Pirates to reclaim the lead for the third time. McCutchen raced home from first on Alvarez's double to left-center.
The Pirates struck quickly with a run in the first inning on McCutchen's sacrifice fly to right. Jose Tabata led off with a double and he moved to third on Neil Walker's fly ball to right.
In the bottom of the first, the Marlins countered on Ramirez's two-out home run that sailed 419 feet to left. It was his seventh of the season.
Pittsburgh regained the lead in the second on Rod Barajas' two-out homer to left.
The Marlins made it 2-2 in the fourth on Morrison's double and Emilio Bonifacio's two-out RBI single.
"When you don't score too many runs, it's tough," Reyes said. "It was one of those games. Tomorrow, hopefully, we can score some runs early in the game."