San Francisco coach Kyle Shanahan opted to start quarterback Jimmy Garoppolo despite a bum ankle and held cornerback Ahkello Witherspoon out at the start with a sore hamstring.

Those moves backfired for the 49ers and sent the defending NFC champions to another loss with a 43-17 defeat at home to the Miami Dolphins on Sunday.

Garoppolo looked out of sorts and threw for just 77 yards with two interceptions as he struggled to push off his injured right ankle that had sidelined him for two games. He was pulled at halftime, but it was too late by then as the Niners (2-3) already trailed by 23 points.

Miami Dolphins wide receiver DeVante Parker (11) catches a touchdown against San Francisco 49ers cornerback Brian Allen (48) during the first half of an NFL football game in Santa Clara, Calif., Sunday, Oct. 11, 2020. (AP PhotoTony Avelar)

Miami Dolphins wide receiver DeVante Parker (11) catches a touchdown against San Francisco 49ers cornerback Brian Allen (48) during the first half of an NFL football game in Santa Clara, Calif., Sunday, Oct. 11, 2020. (AP PhotoTony Avelar)

That deficit was built in part because of the other decision. The Niners started Brian Allen at cornerback a day after he was elevated from the practice squad. San Francisco was without injured starters Richard Sherman, Emmanuel Moseley and slot cornerback K’Waun Williams.

Witherspoon was active but was only supposed to be used in an emergency. That situation came up quickly as Allen was beaten repeatedly by quarterback Ryan Fitzpatrick on the first four drives of his first game in two years before getting pulled after allowing a 22-yard TD to DeVante Parker on Miami’s fourth possession.

By then the score was already 21-7 and the Niners couldn’t climb out of that hole even though Witherspoon was able to play the rest of the game without complications.

Shanahan is expecting Garoppolo to practice on Wednesday and hopes that a full week of practice with the starting offense will help the team rebound from the back-to-back losses to Philadelphia and Miami.

“I understand it hasn’t looked good and we’ve got to get a lot better,” he said. “But there’s no secret to it. There’s one way to get better. It’s practicing. If there was ever an issue that I thought that people weren’t trying their hardest, it would be a completely different situation. I see guys working and I see guys doing what they can.”

The Niners better fix things quickly if they want to be a playoff team because they are about to enter their toughest stretch of the season starting with a home game Sunday night against the Rams (4-1).

After that they have back-to-back road games at New England and Seattle, followed by a home game on a short week against Green Bay and trips to New Orleans and the Rams.

“We have a stretch right here that, if we play like that, it’s not going to be a very fun month,” tight end George Kittle said. “We’ve got to turn it around and I know we have the guys to do that.”

WHAT’S WORKING

Run defense. There wasn’t much that went well for the 49ers, but they did manage to keep Miami’s running game in check. San Francisco allowed just 2.8 yards per carry and only allowed Fitzpatrick to get loose for a scramble once after struggling against mobile QBs in recent weeks.

WHAT NEEDS HELP

Passing game. With Garoppolo hampered it didn’t matter that the Niners had all their starting skill position players healthy for the first time all season. He went 7 for 17 for 77 yards and C.J. Beathard wasn’t much better in the second half, going 9 for 18 for 94 yards. San Francisco’s 3.2 yards per dropback were the lowest for the team since Shanahan’s second game as coach in 2017.

STOCK UP

DL Kerry Hyder Jr. The Niners have been searching for a pass rush with last year’s Defensive Rookie of the Year Nick Bosa out for the season and Dee Ford also sidelined. Hyder has provided a big lift with a team-high 3 1/2 sacks on the season. He chased down Fitzpatrick for a sack on Sunday and has had at least a half-sack in four of the first five games.

STOCK DOWN

Offensive line. A group anchored by tackles Trent Williams and Mike McGlinchey was supposed to be a strength of the offense but the unit has struggled the past two weeks. The Niners allowed five sacks and left the quarterbacks under pressure for much of the game.

INJURED

Sherman could miss another game with his calf injury after having a setback. He will have a shot to try to reduce inflammation. ... Shanahan said he’s more optimistic that Moseley could return this week from a concussion. ... LB Kwon Alexander suffered a possible high ankle sprain in the game. Shanahan said it might only be a minor one so the team will wait until Wednesday to see how he feels. ... DT D.J. Jones (eye) left the game but is expected back at practice.

KEY NUMBER

0-3. The 49ers lost for the third straight time at home to open the season. This is only the fourth team since the merger that they started 0-3 at home, also doing it in 2017, 1979 and 1974. Their worst start at home since the merger was 0-4 in 2017 and 1974.

NEXT STEPS

The Niners host the Rams on Sunday night.

More AP NFL: https://apnews.com/NFL and https://twitter.com/AP_NFL