Eli Manning threw a 3-yard touchdown pass to Sterling Shepard with 53 seconds left and the New York Giants snapped a five-game losing streak by beating the San Francisco 49ers 27-23 on Monday night.

New York Giants wide receiver Odell Beckham Jr., center, scores in front of San Francisco 49ers cornerback Ahkello Witherspoon, right, and defensive back Antone Exum (38) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants wide receiver Odell Beckham Jr., center, scores in front of San Francisco 49ers cornerback Ahkello Witherspoon, right, and defensive back Antone Exum (38) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants wide receiver Sterling Shepard, top, catches a touchdown pass over San Francisco 49ers cornerback D.J. Reed Jr. (32) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants wide receiver Sterling Shepard, top, catches a touchdown pass over San Francisco 49ers cornerback D.J. Reed Jr. (32) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)

Manning threw two TD passes to Odell Beckham Jr. and then engineered the late game-winning drive with help from a pair of third-down penalties against Malcolm Smith and Ahkello Witherspoon.

San Francisco 49ers running back Matt Breida (22) is tackled by New York Giants defensive end B.J. Hill (95), free safety Curtis Riley, center, and middle linebacker B.J. Goodson (93) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
San Francisco 49ers running back Matt Breida (22) is tackled by New York Giants defensive end B.J. Hill (95), free safety Curtis Riley, center, and middle linebacker B.J. Goodson (93) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
San Francisco 49ers quarterback Nick Mullens (4) passes against the New York Giants during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
San Francisco 49ers quarterback Nick Mullens (4) passes against the New York Giants during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)

Saquon Barkley then had a 23-yard catch to get the ball into the red zone and Manning connected with Shepard on third down to give the Giants (2-7) the win.

New York Giants wide receiver Odell Beckham Jr., right, catches a touchdown pass in front of San Francisco 49ers cornerback Ahkello Witherspoon (23) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Ben Margot)
New York Giants wide receiver Odell Beckham Jr., right, catches a touchdown pass in front of San Francisco 49ers cornerback Ahkello Witherspoon (23) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Ben Margot)
San Francisco 49ers running back Matt Breida (22) celebrates with fullback Kyle Juszczyk (44) after scoring a touchdown against the New York Giants during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
San Francisco 49ers running back Matt Breida (22) celebrates with fullback Kyle Juszczyk (44) after scoring a touchdown against the New York Giants during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants wide receiver Odell Beckham Jr., center, scores in front of San Francisco 49ers cornerback Ahkello Witherspoon, right, and defensive back Antone Exum (38) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants wide receiver Odell Beckham Jr., center, scores in front of San Francisco 49ers cornerback Ahkello Witherspoon, right, and defensive back Antone Exum (38) during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)

Matt Breida ran for 101 yards and scored two touchdowns for the 49ers (2-8), who were unable to win consecutive games under third-string quarterback Nick Mullens. Breida’s 23-yard run helped set up a 30-yard field goal by Robbie Gould that gave the Niners a 23-20 lead with 2:46 to play.

New York Giants wide receiver Odell Beckham Jr. (13) and quarterback Eli Manning (10) celebrate after connecting on a touchdown pass against the San Francisco 49ers during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Ben Margot)
New York Giants wide receiver Odell Beckham Jr. (13) and quarterback Eli Manning (10) celebrate after connecting on a touchdown pass against the San Francisco 49ers during the second half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Ben Margot)
New York Giants running back Saquon Barkley (26) runs against San Francisco 49ers defensive back Jimmie Ward (20) during the first half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants running back Saquon Barkley (26) runs against San Francisco 49ers defensive back Jimmie Ward (20) during the first half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)

___

San Francisco 49ers quarterback Nick Mullens (4) passes against the New York Giants during the first half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
San Francisco 49ers quarterback Nick Mullens (4) passes against the New York Giants during the first half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Tony Avelar)
New York Giants quarterback Eli Manning (10) passes against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Ben Margot)
New York Giants quarterback Eli Manning (10) passes against the San Francisco 49ers during the first half of an NFL football game in Santa Clara, Calif., Monday, Nov. 12, 2018. (AP Photo/Ben Margot)

Source: The Associated Press