LANDOVER, Md. (AP) -- Josh Brown kicked a 49-yard field goal on the last play of the game Sunday, giving the St. Louis Rams a 19-17 upset of the Washington Redskins to end an eight-game losing streak over two seasons and make Jim Haslett a winner in his St. Louis head coaching debut.

It takes a fluke play or two for a winless, two-touchdown underdog to pull off the stunner. The Rams got one at the perfect time in the first half against the Redskins, then pulled off the win in the final minute with the help of a big third-and-long pass.

The Redskins (4-2) overcame a nine-point fourth-quarter deficit and appeared set to win their fifth straight game when Clinton Portis' 2-yard run with 3:47 left gave Washington a 17-16 lead. But the Rams had enough time to mount a comeback, and Marc Bulger hit Donnie Avery down the right sideline for a 43-yard gain on third-and-13 to move into field goal territory.

But the Rams, being the Rams, nearly botched the game from there. While St. Louis was trying to kill the clock to set up for an easy field goal attempt, offensive lineman Richie Incognito was called for an unsportsmanlike conduct penalty for aiming some choice words at an official. The 15-yard infraction made Brown's kick no longer a gimmie, but he still managed to nail his fourth field goal of the game.

Two weeks ago, the Rams (1-4) looked like a team in need of a massive federal bailout. Instead, they fired coach Scott Linehan, reinstalled Bulger as the starting quarterback and used their bye week to get out of the dumps.

Then they came out and beat one of the hottest teams in the league. The Redskins (4-2), playing as a huge favorite for the first time under coach Jim Zorn, played down to the level of their competition and became a very ordinary team by failing to do something they had done so well all season: protect the football.

The Redskins entered the game as the only team in NFL history to open a season with no offensive turnovers through its first five games -- for that matter, the offense hadn't fumbled the ball even once -- but that good fortune ended with four fumbles in six possessions.

The Rams were able to convert only one into a score, but it was the type of weird play that can give a struggling team the lift it needs.

With the Redskins in scoring position near the end of the first half, a pass tipped at the line of scrimmage ended up in the hands of offensive lineman Pete Kendall. Linebacker Pisa Tinoisamoa knocked the ball away from an awkwardly moving Kendall, and Oshiomogho Atogwe picked it up and streaked 75 yards down the sideline for the touchdown that gave the Rams a 10-7 lead.

And the momentum.

Dominated in the first half, St. Louis controlled the third quarter and added two field goals to go ahead 16-7. The Redskins retook the lead with a field goal and Portis' touchdown, but Brown's final kick gave the Rams a win in a game in which they were outgained 368-200.

Steven Jackson ran for 79 yards on 22 carries and caught three passes for 32 yards. Bulger went 15-for-26 for 136 yards.

The Redskins' only touchdown until late in the game came early in the first quarter after a Rams error. Jackson fumbled inside his own 10, and Portis cashed in with a 3-yard run.

Portis ran 21 times for 129 yards, his third straight 100-yard game.