A Navy washout on a suicide mission plowed his car through three blocks of sidewalk pedestrian traffic in Times Square on Thursday, killing a teenage tourist and injuring 22 others.

“You were supposed to shoot me! I wanted to kill them,” Richard Rojas, 26, told police after his bloody rampage, according to sources.

The killer, who has been arrested twice for drunken driving, was heading south on Seventh Avenue at 11:55 a.m. when he pulled a sudden U-turn at West 42nd Street, then barreled north — the wrong way — sending victims flying and witnesses running for their lives.

Rojas, of the Bronx, finally crashed his Honda Accord into a stanchion at Broadway and 45th Street — then got out of the car and ran toward a group of people with his arms outstretched before being tackled by law enforcement, including a transit cop and an FBI agent.

“He was driving like a madman and screaming,” eyewitness Michael Rickerby, 24, a tourist from Tennessee, told The Post. “It looked like he was trying to hit people. He had the angriest, craziest face, and he was literally going after people.”

Witnesses watched in horror as Rojas’ car raced up the sidewalk, killing Michigan tourist Alyssa Elsman, 18, who was standing near her 13-year-old sister, between 42nd and 43rd streets.

The incident sparked fears of terrorism, but officials said they have no reason to believe that played a role in the carnage.

“Based on the information we have at this moment, there is no indication that this was an act of terror,” Mayor Bill de Blasio said.

Of the 22 injured, four were rushed to hospitals in serious condition, with open fractures and “multiple traumas,” officials said.

“None of those four are likely to perish. We’re very hopeful . . . that they will survive,” said FDNY Commissioner Daniel Nigro.

Rojas was taken to the Midtown South Precinct station house, where he told police he had hoped to commit suicide-by-cop, sources said. He wasn’t drunk, but police suspect that he may have been using drugs, for which he was undergoing testing Thursday afternoon, sources said.

Rojas was arrested for drunken driving in 2008 and again in 2015. Most recently, he was busted on May 11 for threatening a man who had come to his home to get an annuity notarized.

“You’re trying to steal my identity,” he told the man as he held a knife to his throat, according to court papers.

In that incident, he was charged with menacing and criminal possession of a weapon but pleaded guilty to harassment.

Rojas served in the Navy as an electrician’s mate fireman apprentice from 2011 to 2014 and was dishonorably discharged, sources said.

He was arrested in 2012 at a naval base in Jacksonville, Fla., for allegedly attacking a cabdriver and threatening to kill cops, according to court records obtained by Reuters.

“My life is over,” he shouted at the cabby before his bust. Rojas was charged with misdemeanor battery and resisting an officer without violence.

In 2013, he also spent a couple months behind bars in a military prison in Charleston, SC, but it’s unclear why he was locked up. A pal said he was never the same after his stint in the military and took to drinking to relieve his stress.

“He finally came home, and it was hard for him to find a job,” said Harrison Ramos, 30. “He was having a lot of bad nightmares. He was talking crazy. He was acting strange.”

Rojas would rant about “demons and devils” and became wrapped up in conspiracy theories — a far cry from his behavior before his military service, Ramos said.

“He started drinking to help with his problems. He didn’t drink before,” the friend said. “I saw him about a week ago, and I asked him how’s he doing, and he sounded lost in the world, like he wasn’t with all his five senses.”

But on Wednesday night, Rojas appeared to be in “good spirits” as he celebrated getting his impounded car back, another friend said.

“He just got his car back, a Honda,” said José Medrano, 27. “He was happy about it. He said they had taken his car for lack of payment. He’d just gotten it back and was happy. He was drinking last night out here, with his friends.”

The next day, Rojas used the Honda for his deadly spree.

Witnesses recalled victims being lifted off the ground by his car, as frightened pedestrians ran for shelter.

“I see this woman was midair and this guy is revving his engine and just going full-speed,” said deliveryman Julio Sanchez River, 20.

“He was on the curb between 42nd and 43rd. It was a pretty scary sight. It was really gruesome. There were clothes and shoes everywhere.”

Rojas resisted until the end, punching a police officer while struggling to get away, witnesses said.

Civilians also sprang into action to help capture him, including Alphe Balde, 57, who works in Times Square for Gray Line Tours.

“I grabbed him by the neck,” he said. “I said, ‘You’re not getting away.’ ”

Additional reporting by Kevin Fasick and Danielle Furfaro