PITTSBURGH -- Georgia Tech overcame an early double-digit deficit to get in position to snap its two-game losing streak, but the Pittsburgh Panthers scored twice in the final 5 minutes to win 37-34 at Heinz Field Saturday.

Chris Blewitt hit the game-winning field goal from 31 yards out as time expired, just as he had in 2015 to give the Panthers the victory over the Yellow Jackets. Blewitt's kick hit the upright before falling in.

The win gave Pitt (4-2) its first ACC win of the season. The Yellow Jackets (3-3) have lost three in a row after starting the season 3-0.

Just minutes before Pitt's field goal, the Yellow Jackets looked poised to pull off the comeback.

The Yellow Jackets tied the game in the fourth quarter off a 45-yard run by Clinton Lynch, knotting it up at 27.

On the next drive, Brant Mitchell picked up a fumble off a botched hand-off by Pitt to put the Yellow Jackets in a good position to get their first lead of the game.

Justin Thomas threw it to Brad Stewart who was wide open in the end zone, but an ineligible receiver penalty brought the play back. Thomas threw it right back to Stewart on the next play for a 27-yard gain. Three plays later, J.J. Green found the end zone from 10 yards out to give Tech the lead.

But the Jackets held the lead for all of a few seconds as Nathan Peterman found Scott Orndoff who took it 74 yards and into the end zone to tie the game at 34.

Georgia Tech found itself in a fourth-and-1 on the next drive. Dedrick Mills tried to punch it up the middle, but was stopped short. The Yellow Jackets gave the ball back, and Pitt marched down the field to kick the field goal and win.

Georgia Tech was 2-for-4 on fourth downs.

Thomas completed 7 of his 10 passes for 130 yards and one touchdown. He also rushed for 55 yards, giving him 2,014 rushing yards for his career. He is the third quarterback in Georgia Tech history to rush for 2,000 yards in a career.

Peterman completed 14 passes on 20 attempts for 192 yards and one touchdown.

After scoring on all but one of their drives in the first half, the Panthers were slowed down by Tech's defense, but still finished with 407 total yards. Blewitt kicked three field goals in the second half. His longest was 41 yards.

Pitt went into halftime clinging on to a 1-point lead after leading by as many as 11.

The Panthers scored on game's opening drive on a 24-yard touchdown run by Brian O'Neill. They would go on to score on the next two drives.

Qadree Ollison punched it in for a 4-yard touchdown run to put Pitt up 14-3, and Quadree Henderson had a 10-yard rush into the end zone to put the Panthers back up by 11 for the second time in the first half.

But the Yellow Jackets would not go away. They were limited to a field goal on their first drive. After Ollison's touchdown run, Green ran the kickoff back 96 yards for the Jackets' first touchdown of the game.

Green finished the day with four carries for 26 yards.

The Yellow Jackets' first score on offense came off a spectacular catch by Ricky Jeune, who jumped up to grab Thomas' pass from 31 yards out.

Tech's defense forced Pitt to go three-and-out on their next drive to get the ball back before the half, and Harrison Butker kicked a 41-yard field goal to cut the deficit to one. He was 2-for-2 on the day.

Georgia Tech returns to Bobby Dodd Stadium next week to face Georgia Southern.