Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The teenager accused of gunning down a classmate and wounding three others at a Washington state high school told police he wanted "to teach everyone a lesson about what happens when you bully others."

In court records released Thursday, 15-year-old Caleb Sharpe also divulged the last words Sam Strahan, the sophomore he is accused of killing Wednesday at Freeman High School in the town of Rockford, about 25 miles southwest of Spokane.

"I always knew you were going to shoot up the school," Strahan, told Sharpe, according to the records quoting Sharpe. "You know that is going to get you in trouble."

Spokane County sheriff's deputies escorted Caleb Sharpe to the Juvenile Detention Center in Spokane, Washington, on Wednesday. Colin Mulvany / The Spokesman-Review via AP

Sharpe was being held at the Spokane County juvenile detention center and was awaiting a court appearance.

Spokane County Sheriff Ozzie Knezovich said authorities intend to charge Sharpe as an adult with premeditated murder.

The three female students who were wounded were hospitalized in stable condition, officials said. Their names haven't been released.

Sharpe was a troubled teenager and had "been in the care of a school counselor for suicidal ideations," court records state.

Even so, Sharpe's father, Benjamin Sharpe, told a detective that his son "knows the combination to the large gun safe, which is most likely where the firearms came from."

Sharpe was armed with an "automatic rifle and automatic handgun" that he'd gotten from his father's arsenal and that he carried to school on the bus in a "black sports style duffel bag," the papers say.

Law enforcement sources, however, said the weapons were actually semi-automatic.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A Freeman High School bus driver identified in the papers as Debbie Conklin told police that she picked up Sharpe at the regular bus stop near his home and that she made note of the duffel bag because Sharpe doesn't take part in athletic activities.

When Sharpe got to the school, he entered by a side entrance, where he tried and failed to load the rifle, investigators said.

"The gun immediately jammed and he struggled to load it," the records state. So the suspect "abandoned the rifle and pulled his handgun out from under his coat."

It was around this time that Sharpe crossed paths with Strahan, according to the court papers, which identify him by the initials S.D.S. Sharpe told police that "he had been picked on by S.D.S. before but did not come to school specifically to shoot S.D.S.," the documents say.

Police said Sharpe shot Strahan in the abdomen near classroom 211, opposite a row of lockers.

"S.D.S. bent over and Caleb shot S.D.S. once more in the face," the papers state. "S.D.S. fell to the ground and Caleb then began to move down the hall firing at students near the lockers."

Sharpe continued firing until that gun jammed, according to the documents, which say that after he ejected a live round, the suspect "accidentally fired another round which hit the floor nearby."

The rampage ended when a school custodian approached Sharpe and ordered him to surrender, Knezovich said. Minutes later, Deputy Ron Nye, who had been at a nearby middle school, arrived and took the teenager into custody.

Later, Sharpe's mother, Erica Sharpe, reported finding a suicide note that her son had written a week earlier and left behind on a counter.

Sharpe "bragged of owning multiple pistols," a friend, identified in the court papers by the initials D.A.P., told police. He also claimed to have made explosives known as IEDs "from various chemicals and white gas," the documents say.

The teenage suspect also posted several YouTube videos in which he and another youth appeared to be shooting at each other with some kind of guns, NBC News has confirmed. The videos have been deleted, and it wasn't clear what kind of weapons they were wielding.

Sam Strahan Courtesy of Strahan family

Meanwhile, the victim's cousin, Anna Strahan, called the slain teen "my hero."

"In the face of tragedy, Samuel David Strahan ran towards the shooter instead of away," she wrote. "He died in a moment of bravery and selflessness."

Anna Strahan added that "the cause of Sam's death is bigger than a mental health of bullying issue."

"Sam is gone because another teen with mental health issues had the tools to carry out this horrific event," she wrote.

Earlier, school Superintendent Randy Russell announced they received an offer of help from the Marysville, Washington, School District, which experienced a deadly school shooting in 2014.

"You don't expect it to happen. You don't expect it to happen here, and you certainly don’t expect it to happen to your students," he said. "And folks, it happened. And we’ve got to figure out how to take the pieces of the puzzle, and put them back together."

Russell said he visited the three wounded students in the hospital Thursday and “I’m happy to report that they are doing pretty darn well, considering the circumstances.”

"They're lucky to be alive," he said. "And I will tell you that they’re alive because of their classmates and the staff at Freeman High School, and the EMTs that were here to help us."

But, he added, "We can’t sugar-coat what happened. It could have been a lot worse."