Vince Velasquez bent over in despair Thursday afternoon, as yet another home run sailed over him. The Phillies pitcher allowed two homers before recording the first out of the second inning. A brutal afternoon seemed guaranteed.

But then Velasquez stood tall. He grabbed the ball from Jorge Alfaro, swiped his cleat through the dirt, and reset himself. The righthander struck out 10 of the next 12 batters he faced, as the Phillies completed a four-game sweep of the San Francisco Giants with a 6-3 win at Citizens Bank Park.

The win gave the Phillies a tie for first place in the National League East, at least until the Braves and Marlins played Thursday night. They are seven games over .500 and have eight more wins through 37 games than they did last season. The Phils have swept four of their first 12 series, a feat they last achieved in 1993.

Velasquez walked one and allowed just five hits. After that home run that put the Phillies in a three-run hole, he gave up just two more hits and didn't allow another run.

He used his fastball for 58 percent of his 101 pitches, and its velocity increased as the game went on. His curveball, with which he picked up four swinging strikeouts, had a dramatic vertical drop. He mixed in a slider and seemed to have command of all three pitches.

"Look, there's a brilliant pitcher in there," manager Gabe Kapler said after the game. "And every time we look out at him, no matter what the outcome of the game is, we always see that that brilliant pitcher exists. And it wasn't there in every moment today. But it was there in flashes. What I'm speaking to specifically is a calm, relaxed demeanor on the mound that leads to a very fluid and athletic and graceful delivery that leads to good stuff and swings and misses. It really is that simple."

The Phillies dug themselves out of the early hole by scoring four runs in the fourth. Rhys Hoskins singled in a run, and Carlos Santana followed with a three-run homer. Santana's slow start seems to be behind him: he finished the series with 13 RBIs and has a 1.088 OPS in nine games this month.

Odubel Herrera went 3 for 4 with two RBIs. He has reached base safely in 39 straight games, going back to last season, and is one game shy of tying Willie Montanez for the seventh-longest mark in team history. Cesar Hernandez had two hits, Pedro Florimon stroked a triple, and even Velasquez went 2 for 2. The Phillies are averaging 5.55 runs through their first nine games this month, as the lineup has come alive.

Velasquez was followed by three relievers — Seranthony Dominguez, Luis Garcia, and Hector Neris — each of whom retired every batter he faced. Dominguez's and Garcia's fastballs touched 98 miles per hour. Neris struck out two of the three batters in the ninth. The Phillies have some weapons in their bullpen.

"It was a real all-around team performance that we can all be proud of," Kapler said. "If we would have come in today and said, 'Hey we took three out of four; we lost today,' " that would have been a positive. But our guys got greedy. And we stayed on it. We stayed on the gas. Sweeping that team, that's a huge accomplishment. That's a good group over there. That team is going to win a lot of baseball games. I'm proud of the last four games for us."

The pitching performances were the latest in a week of strong outings. The starting rotation — beginning with Jake Arrieta's six strong innings on Sunday — has compiled a 1.47 ERA over the last five games. The Phillies signed Arrieta to be a veteran presence for their young rotation, and it seems as though he has provided inspiration.

It was difficult to expect an inspiring performance from Velasquez when Thursday's game began. The leadoff batter, Gregor Blanco, homered on the second pitch. Velasquez then threw four straight balls to Brandon Crawford and started Evan Longoria with a ball. The fans cheered sarcastically when Velasquez finally threw a strike.

His response to that first homer was not impressive. But it was the way he responded an inning later, to that second homer, that saved his afternoon.

"It's just going into my little comfort zone and pretty much putting the foot down," Velasquez said. "It's just a different mentality when you give up three runs, you kind of just say, 'Forget it.' I mean, you're thinking of the other word, but you've got to forget it and keep moving on and get a little more aggressive to the point where you could control it and not get wild and out."

Extra bases

Reliever Pat Neshek said he's unsure how long he will be sidelined by the mild strain in his flexor tendon. The forearm injury could keep him from throwing for "10 days to a month," he said. … Carlos Santana hobbled off the field after sliding into first base to record an out after making a diving catch. He remained in the game and said his left knee is fine. …The Phillies will open a three-game series Friday with the Mets at home, with Jake Arrieta facing lefthander Steven Matz.