What a way to end the Saints home winning streak.

Drew Brees was hit from behind by 49ers linebacker Ahmad Brooks in overtime, setting up Phil Dawson’s 35-yard field goal, allowing the 49ers to exit the Mercedes-Benz Superdome with a 27-24 victory.

The loss shocked a crowd which witnessed the first Saints home loss of 2014. Previously, the Saints had won 20 consecutive games here with coach Sean Payton on the sidelines.

It also ruined a second-half rally which saw the Saints rebound from a 14-0 deficit in the second quarter.

Still, it was too little, too late. Or, not enough, as the Saints failed to score on two possesions in overtime, including the first of overtime.

That allowed San Francisco to improve to 5-4. The Saints dropped to 4-5.

The Saints continue a three-game home stand next week against Cincinnati.

Brees passed for 292 yards and three touchdowns, but also threw two interceptions, including an ill-advised throw intended for Jimmy Graham in the end zone with 17 seconds left in the second quarter. On the play, Graham was not only tripled covered, but faced three 49ers defenders in front of him.

Colin Kaepernick and Stevie Johnson played the heroes for the 49ers, connecting on a fourth-and-10 at their 22 with a 51-yard competition. On the play, Kaepernick scrambling right of the pocket to keep the play alive before throwing across his body to find Johnson wide-open down the field.

Minutes earlier, Saints receiver Marquees Colston atoned for a costly drop earlier in this matchup against San Francisco, catching a 24-yard pass on fourth down with less than three minutes remaining. Three plays after Colston’s catch, Brees connected with Jimmy Graham, giving the Saints a 24-21 lead.

But the 49ers responded, with Colin Kaepernick finding Stevie Johnson for a 51-yard gain on a fourth and 10 at the San Francisco 22. Johnson’s play set up Phil Dawson’s 45-yard field goal.

The Saints then missed out on a chance for a spectacular ending to regulation as tight end Jimmy Graham was penalized for pass interference on the final play of the fourth quarter, erasing his 47-yard touchdown reception.

The 49ers jumped out to a 14-0 lead with two rushing scores to the right side of the Saints defense. The Saints trailed 14-3 at halftime.

Mark Ingram (120 yards) became the first Saints running back since 2003 to rush for 100 or more yards in three consecutive games.

Kaepernick passed for 210 yards and one score. He also ran four times for 24 yards Running back, Frank Gore, had 81 yards and one score.