Just when you thought things couldn’t get worse for the woebegone Giants, they were completely dominated by a winless 49ers team.

Murphy’s Law appears to be in full for effect for the New York Giants this season, as one of the darkest seasons in franchise history continued to worsen on Sunday afternoon.

Rookie C.J. Beathard threw for a career-high 288 yards and tallied three total touchdowns, and the Giants allowed the San Francisco 49ers to pick up their first victory of the season, falling 31-21. The loss puts the Giants in dead last in the NFC, and the Cleveland Browns are now football’s lone winless team.

The game got off to a start almost symbolic of the Giants’ season thus far, as Aldrick Rosas‘s opening kickoff sailed out of bounds, setting up the 49ers at their own 40. The first play from scrimmage gave way to a 28-yard run by Carlos Hyde, one that tacked 15 yards on when Darian Thompson was sentenced to a 15-yard unnecessary roughness penalty. The defense did buckle down, allowing only a 43-yard field goal by former teammate Robbie Gould. Rosas would end up atoning for his mistake on the Giants’ ensuing opening possession, a 47-yarder that tied the game up.

Forever so brief a moment, the Giants defensive dominance continued, as San Francisco once more ventured into their territory, but fullback Kyle Juszczuk was stopped on 4th and 1 at the Giants 36. Rosas gave the Giants the lead with his second field goal of the game, this one from 42 yards out.

The Giants once more took advantage of a Juszczuk mistake, as Curtis Grant recovered a fumble forced by Andrew Adams. The Giants followed it up with a turnover of their own, however, as Eli Manning‘s ill-advised attempt at avoiding a sack ended in disaster, as his desperate throwaway turned into a fumble recovered by Eric Reid.

San Francisco took immediate advantage, as three players later, CJ Beathard found Marquise Goodwin for an 83-yard score, beating newly reinstated cornerback Janoris Jenkins for the score.

The Giants would strike back quickly, embarking on a 10-play, 75-yard drive, ending with yet another Evan Engram touchdown, his fifth of the season and fourth consecutive game with a score. His fifth touchdown is the most by a rookie tight end in Giants history, tying a record set by Bob Tucker in 1970.

In another display of offensive ineptitude and silliness, the Giants immediately gave back the lead, this time for good. San Francisco needed just six plays and 100 seconds to go 76 yards, concluding with another tight end score, this one from San Francisco. Garrett Celek, brother of longtime Giants nemesis Brett, was the lucky recipient, as he outran Jenkins and Jonathan Casillas for a 47-yard score.

To open the second half, the Giants embarked on a solid drive, getting to the San Francisco 16, but Rosas missed a 34-yard attempt, marking the fourth consecutive game where he was missed a field goal. The Giants kept their hopes alive when Olivier Vernon, who reintroduced himself to NFL football with his first career interception.

The Giants, however, were unable to capitalize, punting after four plays.

San Francisco, unlike their one-win counterparts, would score on each of their next two drives, allowing them to put the game away. Beathard opened the fourth quarter with his first career rushing touchdown, scoring from 11 yards out, while Matt Breida‘s 33-yard scoring rush sent Levi’s Stadium into a frenzy, putting San Francisco up 31-13.

The Giants were able to make the score look somewhat respectable when they ended the game with a 15-play, 90-yard drive concluding with a 14-yard Roger Lewis touchdown pass from Manning, while a Darkwa two-point conversion created the final margin.

San Francisco (1-9) concluded the game with a season-high 186 rushing yards, paced by Carlos Hyde’s 98. Manning completed 28 of 37 passes for 273 yards, but he was also sacked three times.

New York (1-8) returns home next week for a showdown against the Kansas City Chiefs at MetLife Stadium (1:00 p.m. ET, CBS).

Geoff Magliocchetti is on Twitter @GeoffMags5490