Updated

(SportsNetwork.com) - A pair of AFC East rivals coming off disappointing late-game defeats will jockey for playoff position in South Florida on Thursday as the Miami Dolphins entertain the Buffalo Bills.

Both teams enter the short week with identical 5-4 records -- two games behind division-leading New England.

The Dolphins fell in Detroit when Matthew Stafford found Theo Riddick for an 11-yard touchdown with 29 seconds remaining, lifting the 7-2 Lions to a 20-16 victory.

Miami had a three-point lead with 3:47 to play, but managed to take just 34 seconds off the clock before punting it back to Detroit.

Stafford moved the Lions into Dolphins territory with consecutive passes of 17 yards to Golden Tate and 18 yards to Calvin Johnson by the two-minute warning. Tate then hauled in a pass on 3rd-and-10 and got just far enough for a first down at the Miami 17 with a little over a minute left.

Faced with another third down soon after, Stafford was flushed out of the pocket to his left before flinging a pass toward the end zone and Riddick, the former Notre Dame star who made a sliding grab for the game-deciding score.

Miami was left with no timeouts and reached its own 40 before a completion and a series of laterals ended out of bounds as time expired.

Ryan Tannehill completed 27-of-38 passes for 201 yards with an interception and a TD to Mike Wallace, who caught five balls for 51 yards as the Dolphins had a three-game winning streak halting, falling for the first time since a similar loss to Green Bay back in Week 6.

"We knew this was going to be a tough game coming in because they have a good team and a tough defense," said Tannehill. "We kept moving the ball but couldn't get it in the end zone and that's what it comes down to, putting the ball in the end zone."

Perhaps even worse than the setback was the news that star left tackle Branden Albert will miss the remainder of the season with a torn ACL in his right knee suffered in the second quarter.

Albert was Miami's big free agent acquisition in the offseason, signing a five-year contract worth a reported $47 million. He spent his first six NFL seasons with Kansas City and earned his first Pro Bowl nod last year.

"He's a professional. He's a hard worker," Dolphins coach Joe Philbin said. "I thought he set a great example for the other guys."

Albert's absence created a domino effect on Miami's line with rookie first- round pick Ja'Waun James switching from right tackle to left tackle, Dallas Thomas, who started at left guard in place of the injured Daryn Colledge, moved to right tackle and Shelley Smith took over at guard.

Philbin said the revamped line from Sunday would likely be the starting unit again against the Bills, who are coming off their own tough loss, a 17-13 setback at the hands of Kansas City.

"What you saw is probably what you're going to get (Thursday)," Philbin said. "Those guys weren't perfect, but overall I thought they held their own."

The Chiefs' Jamaal Charles and Alex Smith both ran for touchdowns in the fourth quarter as Kansas City rallied for the win over Buffalo, it's fourth straight.

Kyle Orton was 29-of-48 for 259 yards and a touchdown in the loss for the Bills, who carried a 10-point edge into the final frame and squandered opportunities to put the Chiefs away.

"We definitely lost an opportunity," Bills coach Doug Marrone said. "Now we're going to have to fight our way back and find a way to win our next game."

"It's definitely tough, we lost the football game and we're definitely upset about that," added Bills defensive end Jerry Hughes, who had a pair of sacks in the game. "We've got a Thursday game, we've got a division game so we've got a chance to sweep Miami this season. That's our focus right now, just find a way to get ready for that game."

Buffalo is indeed shooting for the season sweep after topping the Dolphins 29-10 in western New York back in September when Sammy Watkins hauled in eight passes for 117 yards and a TD from then-starter E.J. Manuel.

Marrone has never lost to Miami (3-0) but the Dolphins still lead the all-time series by a significant 56-40-1 margin.

"You lose three in a row to anybody, it's not going to feel good," Dolphins cornerback Brent Grimes said. "The Bills play us very well. It'll be a huge game."

The Bills are 6-7-1 in Thursday games while Miami is a solid 10-6 on short weeks.

WHAT TO WATCH FOR

The Bills and Dolphins haven't played each other this late in the season with each team boasting a winning record since 2000 so this is very big for each club.

The Albert injury looms large for the Dolphins because Buffalo's defense ranks first in the NFL with 34 sacks, the franchise's best ever sack total through nine games. The Bills can come at you in waves and are the only team with three different players with at least seven sacks -- Hughes (7 1/2), defensive tackle Marcell Dareus (10) and defensive end Mario Williams (7).

Dareus, who had three sacks against Kansas City last week, leads all NFL interior linemen.

"We need to start studying the Bills because they are a good defense coming to town on a short week," Tannehill said. "We need to watch the tape, learn from our mistakes and quickly put it aside. We need to rest up and get ready to go on Thursday night."

Despite the loss last week Tannehill, a third-year starter, has taken off a bit recently, throwing for 1,490 passing yards and 11 touchdowns with a 99.7 passer rating over his past six games and that's important because Miami is 15-1 when Tannehill has a passer rating of 90 or better.

Tannehill, however, has traditionally struggled against the Bills, compiling a 1-4 record against the division rivals. He has been sacked 18 times in those five games and compiled a dismal 67.0 passer rating.

Establishing a running game would certainly help slow down the pass rush and aid Tannehill but the Dolphins recorded a season-low 50 yards on the ground in Detroit and had only 80 the last time they played the Bills.

Buffalo, however, has struggled to stop the run recently, allowing 153.3 yards per game via the run in its past three contests, including the big 39-yard TD gash by Charles on 4th-and-1 in the fourth quarter last weekend.

On defense, the Dolphins also get after the passer as well as evidence by the fact that they are second in the AFC with 28 sacks. Cameron Wake, who leads the conference in getting to the QB since entering the league in 2009, leads the way and has been hot recently, amassing 6 1/2 sacks in his last five games.

That relentlessness up front meshes well with a secondary led by lockdown cornerback Grimes, who has four interceptions in the past three games and is second in the NFL with five overall this season. Since joining the Dolphins in 2013, Grimes leads all AFC cornerbacks with nine interceptions.

The Bills' biggest issue on offense has been red-zone production where they are dead-last in the NFL. Last weekend Buffalo settled for two field goals in four trips inside the 20 and watched Bryce Brown fumble away a likely TD in the third quarter.

"A couple missed opportunities which, when you're playing a good football team, usually comes back to haunt you," Orton said.

Orton is 3-2 as the Bills starter since replacing EJ Manuel but has never faced Miami before.

OVERALL ANALYSIS

This might not officially be a must-win situation for either team but it's as close as it gets, especially from the Dolphins' perspective.

Although both teams seem in decent shape on the surface at 5-4 with seven games to play, nine of the 11 teams over .500 in the ultra-competitive AFC are actually ahead of both the Bills and Miami in the race for the postseason.

Because short weeks tend to favor the home team in general and the Dolphins figure to be the more desperate team with revenge on the mind as a result of the loss to Buffalo back in September, expect Miami to get it done in a tight affair.

Sports Network predicted outcome: Dolphins 20, Bills 16