EAST RUTHERFORD, N.J. -- Rex Ryan, perhaps the angriest winning coach in the NFL on Sunday, posed a question to which he surely knew the answer.
"How many games are you going to win when you turn it over twice and have 20 penalties?" the New York Jets coach asked rhetorically.
Ryan doesn't want to find out if the Jets can do it twice after they survived a franchise-record 20 penalties and two interceptions by rookie Geno Smith to edge the Buffalo Bills 27-20 at MetLife Stadium.
Smith's 69-yard touchdown pass to Santonio Holmes with 9:34 left snapped a tie and lifted the Jets (2-1) to a victory. The Jets were projected by many to be one of the league's worst teams in what was expected to be a lame-duck season for Ryan.
It's not a pretty 2-1 -- in the season opener, the Jets took advantage of 13 penalties by the Tampa Bay Buccaneers, including a personal foul that led to the game-winning field goal in the final seconds of New York's 18-17 win -- but Ryan takes solace in how much room the Jets have for improvement.
"I know this team's going to get better," Ryan said. "Just think how good we can be if we can eliminate the penalties and the turnovers."
The Jets dominated Buffalo (1-2) for the first three quarters -- a span in which they outgained the Bills 399-203, limited them to one first down or none on eight of 10 drives and held them to four Dan Carpenter field goals -- before a mammoth fourth-quarter meltdown "led" by cornerback Kyle Wilson.
New York committed five penalties on Buffalo's six-play, 80-yard drive that rookie quarterback EJ Manuel capped with a 34-yard touchdown pass to a wide-open Scott Chandler. Manuel's subsequent two-point conversion pass to Stevie Johnson tied the score 20-20.
Wilson, who got the start Sunday over mistake-prone rookie Dee Milliner, committed three of the penalties, including a personal foul in which he shoved Johnson after the latter made a catch.
"Heat of the battle, some things happen," Ryan said. "We needed to get (Wilson) out of there, sit back, think about it, calm down, and that's exactly what we did."
Smith, the Jets' promising but raw rookie quarterback, wasted little time redeeming himself for two interceptions that led to two Bills field goals.
On the second play of the Jets' next series, Smith lofted a perfect deep ball to Holmes, who was draped by Justin Rogers. Holmes made a one-handed catch, wriggled free of Rogers and coasted into the end zone for his first touchdown since Sept. 16, 2012 -- two weeks before he suffered a foot injury that ended his season.
"Our job is to go out and make plays, and Geno gave me an opportunity to make a play," Holmes said. "I think (Rogers) was unaware that (Smith) was throwing me that ball. The ball landed in the perfect place for me to get a chance to catch it, and the rest is in the history books."
Smith finished 16-for-29 for 331 yards passing with two long touchdown passes -- he also threw a 51-yarder to Stephen Hill in the second quarter -- and added 14 yards and a touchdown on four carries.
"We knew that we had to score," Smith said of the touchdown that followed the Bills' game-tying drive. "I think we feel that way every single drive, but especially in that moment. Was just great for us to (go) ahead and get the victory."
The tiebreaking score ensured the Jets would not waste a dominant defensive effort. The Jets sacked Manuel eight times and bottled up C.J. Spiller, who had 10 carries for 9 yards before he left with a knee injury.
Almost half of the Bills' 120 rushing yards came on a 59-yard first quarter scamper by Fred Jackson, who appeared to be stopped by Calvin Pace for no gain before he wriggled free.
"I love the fact that our team found a way to win," Ryan said, "Take away all the other stuff -- we found a way to persevere and we won, and that is really encouraging to me."
Jets running back Bilal Powell set career highs with 27 rushes for 149 yards. Holmes (five catches for 154 yards) and Hill (three catches for 108 yards) each set career highs for yardage.
It was a costly loss for the Bills, who lost Spiller and four other players to injuries. Coach Doug Marrone said he didn't know the severity of any of the injuries.
"We were able to move the ball at times early on, but they scored touchdowns and we kicked field goals," Marrone said.
Manuel, who was sacked just once in his first two starts, finished 19-for-42 for 243 yards and one touchdown. Johnson had eight catches for 86 yards.
NOTES: In addition to Spiller, the Bills lost CB Leodis McKelvin (hamstring), G Kraig Urbik (knee) and DT Marcell Dareus (ankle) before DE Alex Carrington was carted off the field with 1:10 left. ... Powell was thrust into every-down duty when RB Chris Ivory suffered a hamstring injury during the Jets' first possession. Ivory gained 5 yards on four carries. ... The win snapped a five-game AFC East losing streak for the Jets, whose previous division win was a 20-17 overtime victory over the Miami Dolphins 52 weeks earlier. ... Marrone was trying to become the second first-year coach in franchise history to start 2-1. Kay Stephenson won two of his first three in 1983.