FOXBORO, Mass. — The New England Patriots had a chance to spark their offense. Instead, both them and the Buffalo Bills were victimized by a officiating mishap that left everyone confused.

With Monday night’s game tied in the third quarter, Patriots quarterback Tom Brady rolled to his right and hit Danny Amendola with a pass just before stepping out of bounds on a play that looked like it could go for a touchdown.

The line judge on the right sideline blew his whistle as Brady attempted his pass, however, forcing head official Gene Steratore to announce the play was dead because of an inadvertent whistle.

Patriots tight end Rob Gronkowski was far downfield, and his defender might have been the only one standing between Amendola and a touchdown.

“I was down the field, so I didn’t actually see Tom,” Gronkowski said. “But then I saw the replay, so I was wondering, like, ‘Whoa, he was definitely not out of bounds; he was a good few yards (in bounds).’

“But it is what it is, I guess. Everyone’s probably thinking the same: The whistle just shouldn’t have blown.”

NFL vice president of officiating Dean Blandino admitted as much in a phone interview shortly after the Patriots’ 20-13 win.

“The line judge lost track of the football and he blew his whistle inadvertently, so that’s a mistake,” Blandino said, via the NFL’s Twitter account. “We shouldn’t have blown the whistle.”

While Gronk had no problem expressing his confusion, Brady was a bit more reticent.

“I don’t really know what happened,” he said. “I was just kind of rolling, and Danny did a good job kind of springing free and made a great play. … We were on the sideline and he sprung free, so that ended up being a good play for us. I wish we could’ve converted it into more points.”

The referees awarded Amendola a 14-yard reception on the play and also assessed Buffalo’s sideline a 15-yard penalty for interference. Technically, though, the whistle should have negated Amendola’s catch, as it was blown well before the wideout caught the pass.

“It was an inadvertent whistle, and then it goes to a spot, and then apparently I get a 15-yard penalty on me at the same time,” Bills coach Rex Ryan said. “And (the ref) blows the whistle, and I’m like, ‘He blew the whistle,’ and our pass rusher lets up and everything else, and they complete the ball. So I’m not sure what happened there.”

New England failed to score on the drive, but the officials’ blatant error caused plenty of headache on both sides. Except, apparently, for Patriots coach Bill Belichick.

“Yeah, what they explained out there,” Belichick said when asked about the play.

Thumbnail photo via NFL referee Gene Steratore (114) confers with other officials after a New England Patriots touchdown during the second half against the Buffalo Bills at Gillette Stadium.