INDIANAPOLIS — When the day began, the Raiders were perceived to be light years from contention. When it ended, they were just one play away from the national spotlight.

The Raiders self-destructed when it mattered most Sunday in a 21-17 loss to the Indianapolis Colts before 65,412 at Lucas Oil Stadium, but they scored a victory in the relevance column.

“We feel like we’ve got good players,” veteran free safety Charles Woodson said. “We feel like if we put it together we’ll be able to go out there and stand with anybody toe to toe.”

Center Stefen Wisniewski agreed: “It’s a loss, so it’s tough. But we’re certainly very close against a good opponent. It’s a good sign.”

With first-and-goal at the Indianapolis 8-yard line and 1:13 to play the Colts finally managed to sack Terrelle Pryor, with Robert Mathis chasing the quarterback down for a 16-yard loss that put the Raiders in a goal-to-go situation from the 24.

Two plays later, Pryor was intercepted by Antoine Bethea — just as he was intercepted by Greg Toler in the end zone on the Raiders’ first possession — and the Colts had escaped despite generally being outplayed after going up 14-0 in early in the second quarter and threatening to make it a runaway.

“For us to start off down 14-0 and battle back the way we did and take the lead shows a lot about the characters of the guys we have in the room,” Raiders coach Dennis Allen said. “There are no moral victories in the NFL, and we competed, but we didn’t get the thing done.”

In the end, Andrew Luck’s 19-yard scramble through a wide open middle with 5:20 to play stood up as the winning points. The Colts’ second-year quarterback completed 18 of 23 passes for 178 yards and touchdowns of 12 yards to Reggie Wayne and 20 yards to Dwayne Allen and had no turnovers.

Luck was the more polished and efficient quarterback, but ended up praising Pryor, whom he called a “stud.”

Allen did what he could to keep the identity of his starting quarterback for the opener a secret, but after Pryor completed 19 of 29 passes for 217 yards and a TD and rushed for 112 yards on 13 carries, there will be no such drama this week.

The rushing figure was a single-game franchise record for a quarterback, eclipsing Rich Gannon’s mark.

Pryor’s self-assessment, though, was harsh. He called his performance “awful” and said of the sack at the 8-yard line, “I’ve got to throw the ball away. I’ve made the same mistake before and I can’t do that.”

Still, Pryor had the Raiders in position to win against an opponent that won 11 games last season, and his supporting cast looked nothing like the team supposedly so short of talent and salary cap space that it couldn’t possibly compete with the upper eschelon of the NFL.

“If we just went on what the experts say, there would be no need for an NFL season,” cornerback Tracy Porter said. “We’d just go off the so-called gurus.”

Instead, the Raiders out-gained the Colts 372-274, had two more first downs and were on the verge of sending the home crowd home in shock after Pryor got the Raiders to the 8 with a 41-yard pass to a wide-open Jeron Mastrud and a 21-yard strike to Denarius Moore.

“Shoot, you look back at the first half, if we kick a field goal at the end of the half and don’t have that pick on the first drive and a get a field goal, we’re lining up and kicking it for the win,” Wisniewski said.

After the Colts went up 14-0, Pryor directed an 89-yard, 11-play drive that included runs of 29, 13 and 9 yards, with Darren McFadden eventually scoring from the 1-yard line.

“They did a nice job with their scheme,” Colts coach Chuck Pagano said. “And then when they drop back to pass and you think you’ve got him, we talked about keeping him in the pocket and contained. Those things are easier said than done.”

While the defense was figuring out how to slow down Luck, the Raiders had two more possessions in the first half that looked promising but yielded no points. On the first, Pryor missed a potential big-play first down on third-and-1 to Marcel Reece, forcing a Marquette King punt.

On the second, the Raiders made it the Colts’ 30-yard line, and Sebastian Janikowski missed a 48-yard field goal attempt after playing the entire 2012 season without missing an attempt inside the 50.

The Oakland Raiders six-game winning streak ended and they fell out of the pole position in the AFC West with a 21-13 loss on Thursday Night Football to the Kansas City Chiefs. The Bay Area News Group’s Jimmy Durkin and Mark Purdy break down the loss from Kansas City, Mo.

Carr had the worst game of his young three-year career, at least statistically and probably overall. He completed just 17 of 41 pass attempts for 117 yards and zero touchdowns, giving him a passer rating of 49.1. In the football statistical world, that is the equivalent of playing Jeopardy and having Alex Trebek take away your buzzer. There were other...