The outcome left the AFC East race wide open with four weeks remaining in the season. No matter the result of the New York Jets-Oakland game Monday night, only one game will separate the four teams in the division.

The Bills (6-6) had lost their last three games and were in desperate need of a victory. They surprisingly found their footing on the slippery turf of Ralph Wilson Stadium, snapping an eight-game home losing streak against AFC East foes in a game that began and ended in a heavy snowstorm.

Buffalo survived despite a huge game from Miami running back Ricky Williams, who carried 27 times for 228 yards and two scores. It was the best rushing performance ever against the Bills, topping a 207-yard effort by Terrell Davis of Denver in 1997.

"The way our defense has been playing, we didn't think we'd shut them down, but we sure as heck thought we'd come in and slow them down if we run the ball," Dolphins Coach Dave Wannstedt said. "That's what's so disturbing."

Bledsoe had thrown just four touchdown passes in his five previous games after tossing 14 in his first six with his new team. He regained his touch in the slop, completing two scoring strikes late in the third quarter.

"It was awfully good to see that the weather doesn't bother Drew," Buffalo Coach Gregg Williams said.

Bledsoe lofted a 73-yarder to Peerless Price and added a 57-yarder to Eric Moulds with 3:01 left that tipped off the hands of Sam Madison, giving Buffalo a 31-21 lead. The Dolphins (7-5) were hurt by three turnovers, all of which led to touchdowns. The Bills have forced just 14 turnovers this season and nine have come in two wins over Miami.

"Eric and Peerless just came up with big plays for us. That was the deal," Bledsoe said. "We've been struggling for a while trying to get back in that big-play mode we were so adept at early in the season. Today we had some opportunities to do that and Eric and Peerless just came up with the big plays for us."

The Dolphins (7-5) were hurt by three turnovers, all of which led to touchdowns. The Bills have forced just 14 turnovers this season and nine have come in two wins over Miami.

Miami lost Lucas to a stinger to his left shoulder in the third quarter when he was sacked by Keith Newman. Jay Fiedler, who has missed the last five games with a thumb injury, came in and was rusty, completing completing five of nine passes for 15 yards.

Lucas was six of 11 for 40 yards, including a one-yard touchdown pass to tight end Jed Weaver in the first quarter. Third-string quarterback Sage Rosenfels finished the game.

The day started positively for the Dolphins when Williams raced up the sidelines for a 45-yard touchdown run and Weaver caught his touchdown pass for a 14-3 lead.

Bledsoe collected just his third career rushing touchdown when when he went in from two yards out to cut the lead to 14-10.

The tone of the game changed dramatically in the second quarter when Miami gambled on a fourth and four at the Buffalo 36. Lucas was sacked and fumbled and end Chidi Ahanotu returned the ball 17 yards to the Miami 31 for the Bills' first turnover in 16 quarters.

"We were practicing hard all week and it just felt like it all came together," Ahanotu said. "Everyone has been frustrating by the losing streak and it's just nice to get a win."

Three players later, Bledsoe hit Price on a 20-yard touchdown pass to put the Bills in front, 17-14.

Moulds caught five passes for 130 yards and a score and Price had a pair of touchdown catches for 93 yards. Both went over 1,000 receiving yards this season.

Travis Henry also reached a milestone, carrying 35 times for 151 yards and passing the 1,000-yard barrier. It was the fifth time this season Henry had run for at least 100 yards.

The Bills regained the lead on a 55-yard touchdown run by Ricky Williams, the longest of his career. He has rushed for 1,284 yards, breaking the club record of 1,258 set by Delvin Williams in 1978.

"My job is to help the team win," Ricky Williams said. "And if we don't win, I didn't do a good enough job."

The only score of the fourth quarter was a one-yard touchdown run by Henry.

Wannstedt lost for just the second time in eight career meetings with the Bills.

United Press International is a leading provider of news, photos and information to millions of readers around the globe via UPI.com and its licensing services.

With a history of reliable reporting dating back to 1907, today’s UPI is a credible source for the most important stories of the day, continually updated - a one-stop site for U.S. and world news, as well as entertainment, trends, science, health and stunning photography. UPI also provides insightful reports on key topics of geopolitical importance, including energy and security.

A Spanish version of the site reaches millions of readers in Latin America and beyond.

UPI was founded in 1907 by E.W. Scripps as the United Press (UP). It became known as UPI when after a merger with the International News Service in 1958, which was founded in 1909 by William Randolph Hearst. Today, UPI is owned by News World Communications.