University of Massachusetts defensive back Quayshun Smith shakes the hands of fans as he takes the field before the game against Buffalo in Foxborough on Saturday. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts tight end Rob Blanchflower carries the state flag as the team takes the field before their game against Buffalo in Foxborough on Saturday. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

Universtiy of Massachusetts linebacker Leo Krizanovic shakes fans' hands as he takes the field before the game against Buffalo in Foxborough on Saturday. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts offensive linesman Quinton Sales shakes fans' hands as he takes the field before the game against Buffalo in Foxborough on Saturday. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

Buffalo running back Brandon Murie, top, crosses the goal line to score the game's final touchdown as he is tackled by University of Massachusetts defensive back Darren Thellen in Foxborough on Saturday. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts running back Alan Williams, center, is hit by Buffalo defensive back Isaac Baugh, right, as defensive back Okoye Houston moves in to help Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

Buffalo quarterback Joe Licata, left, slides for a first down as University of Massachusetts defensive back Randall Jette, right, moves in Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts running back Michael Cox leaps over the pile from one yard out as quarterback Mike Wegzyn, back, watches only to find the referees ruled Cox short of the goal line on fourth down against Buffalo on Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts linebacker Jovan Santos-Knox, center, celebrates after coming up with a fumble recovery as defensive lineman Hafis Williams, right, and other teammates congratulate Santos-Knox against Buffalo on Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts defensive back Ryan Carter, center, returns a kick against Buffalo on Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

Buffalo running back Brandon Murie, left, cuts up field as University of Massachusetts defensive lineman Hafis Williams is held off the tackle by a block Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts kicker Blake Lucas, center, is congratulated by holder Jeff Strait as they and Buffalo defensive back Najja Johnson, right, watch Lucas' field goal attempt sail over the crossbar Saturday in Foxborough. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

University of Massachusetts wide receiver Tajae Sharpe, left, attempts a catch in the end zone against Buffalo defensive back Cortney Lester on Saturday in Foxborough. The pass was ruled incomplete when Sharpe lost possession while falling to the ground. Buffalo won 29-19. (AP Photo) Purchase photo reprints »

FOXBOROUGH — What looked like the University of Massachusetts football team’s first winning streak as a member of the Bowl Subdivision quickly disintegrated into a 10-point loss Saturday.

Buffalo scored on three consecutive drives in the second half to win 29-19 in front of 12,649 fans at Gillette Stadium.

Things began to turn the Bulls’ way early in the second half, when a punt by Minuteman Colter Johnson from his own 32-yard line was blocked by Adam Redden. Kyndal Minniefield recovered the ball and returned it 33 yards for a Buffalo touchdown that cut the UMass lead to 13-7.

“When the offense didn’t move the ball to start off the half and we had the blocked punt for a touchdown, the momentum of the game really shifted at that time and we gave them life,” Minuteman coach Charley Molnar said. “They had just better effort than we did on that blocked punt.”

UMass (1-10, 1-6 Mid-American Conference) responded with a 3-yard scoring run by Michael Cox to increase its lead to 19-7 after a bad snap led to a failed extra point with 6 minutes, 49 seconds left in the third period.

But the rest of the game belonged to Buffalo (4-7, 3-4 MAC). The Bulls cut their deficit to 19-14 with a three-yard completion from Joe Licata (226 yards and two touchdowns on 18-of-30 passing) to Jimmy Gordon, set up by a 34-yard pass to Fred Lee earlier in the drive.

Buffalo finally took the lead 2:15 into the fourth on a drive featuring a 44-yard connection between Licata and Lee (three catches, 93 yards). That set up a 6-yard touchdown pass from Licata to Alex Neutz. Tight end Alex Dennison then took the snap and connected with Matt Weiser for a two-point conversion and 22-19 advantage.

It looked like the Minutemen might have an opportunity for a comeback when Johnson was forced to punt from the UMass 40 with 9:10 left in the game. Cordero Dixon botched the recovery while getting hit by Randall Jette, knocking the ball into the end zone. While many of the Minutemen faithful thought Dixon had control and then fumbled the ball, which would have meant a safety for UMass, the officials ruled that he never had possession, giving the Bulls a touchback.

The ensuing 80-yard, seven-minute-long Buffalo drive finished with an 11-yard scoring run by Brandon Murie (16 carries, 90 yards) that put the Bulls on top 29-19 with two minutes left. That, along with a stifling Buffalo defense, put the game out of reach.

“That’s a great team we played, a great defense. Those guys are the real deal. They’re flying around,” said Minuteman quarterback Mike Wegzyn, who was sacked eight times, including five times in the fourth quarter, and intercepted twice. “Obviously, right at the end there, they showed what they can do. We just need to look back and learn from what happened.”

The first half was a collection of missed opportunities by UMass. Although the defense stifled the Bulls, forcing Buffalo to punt on five of six drives and to fumble on the sixth, the offense failed to capitalize. The Minutemen settled for two Blake Lucas field goals before Wegzyn (215 yards, one touchdown on 20-of-40 passing) finally connected with Rob Blanchflower for a 14-yard touchdown in the half’s final minute.

A thin offensive line contributed to the struggles as both Anthony Dima and Michael Boland were out with upper-body injuries.

“It’s frustrating. Anthony Dima has unquestionably been playing the best on our offensive line, at least through the last three or four weeks.” Molnar said. “To lose your best offensive lineman when you don’t have many good ones was a blow to our team. We did the best we could. We stayed positive in practice. I hoped that Dima would be back. Obviously, it just wasn’t to be.”

UMass will end its season against Central Michigan at 3 p.m. Friday at Gillette Stadium.