CLEVELAND (AP)As San Francisco’s Jake Moody lined up for a potential winning field goal with six seconds left, Browns quarterback P.J. Walker made a prediction to teammate Amari Cooper sitting next to him on the bench.

“I told him he was going to miss it,” Walker said.

Spot on.

When Moody pushed his 41-yard kick to the right, it gave Cleveland a shocking 19-17 win over previously unbeaten San Francisco and capped a crazy week for Walker, who went from practice squad QB to starter in a matter of days.

Filling in for the injured Deshaun Watson, Walker shook off an interception in the fourth quarter and made just enough plays – with a little luck thrown in – to set up Cleveland kicker Dustin Hopkins for two field goals in the final 3:21 that lifted the Browns (3-2) to a victory few thought possible.

It was Cleveland’s biggest win since Watson became their quarterback – and he had nothing to do with it.

Watson sat out with a bruised right shoulder t hat has become something of a mystery, and it’s not known when he’ll back. Until he’s ready, Walker is in charge of Cleveland’s offense and he showed he’s at least capable of making big throws when he needs to.

“He battled,” Browns coach Kevin Stefanski said. “He’s going to tell you he wishes he had a couple of plays back like all quarterbacks do. That’s kind of what we talk about. We’re striving for perfection, but it’s hard to attain it.

“But he made some throws. He made some plays. He ran the show. So that’s what he does. He’s a battler. He’s a tough kid.”

And for the second year in a row, Walker pulled off an improbable win. Last season, in one of his five starts for Carolina, he guided the Panthers to a 21-3 victory over Tom Brady and Tampa Bay.

It’s been a wild ride of late for Walker, who built his resume with a stint in the XFL. He was released by Chicago during the preseason, signed by the Browns and the 28-year-old spent his first month in Cleveland running the scout team as the No. 3 quarterback behind Watson and rookie Dorian Thompson-Robinson.

When it became clear Watson wouldn’t be able to play against the 49ers (5-1), the Browns decided not to go with Thompson-Robinson, who had struggled so badly in his pro debut two weeks ago, and moved Walker into the backup role instead.

Still, it wasn’t until the middle of the week that Walker got his first practice reps with Cleveland’s starting wide receivers. Walker made sure he had the game plan down pat, and he spent the past few days reminding his teammates the 49ers were beatable.

“They tie their shoes like us, man,” Walker said. “At the end of the day, they’re good, but we are all here for a reason. They’re a great football team. And for us, it’s just go out there and battle. We ain’t going to bow down to nobody and that’s it.”

Walker finished 18 of 34 for for 192 yards with two interceptions and a 45.2 passer rating – hardly impressive.

However, what did stand out was Walker’s ability to shake off throwing an interception that allowed the 49ers to take a 17-13 lead with 10:58 remaining. He forced a pass for Cooper that San Francisco’s Deommodore Lenoir picked and returned to Cleveland’s 8-yard line.

One play later, the Browns trailed.

But even after his mistake, Walker kept his cool.

“There’s still a lot of time left,” he said. ”Been in the situation before. I mean, it’s football, man. You’re going to make mistakes, but you can overcome mistakes as well because you’ll get another opportunity.

“So, for me, it’s always about bouncing back. I mean, things happen and just keep going.”