Updated

A 17-year-old boy who burst into a California high school strapped with explosives was out for revenge and intended to commit a "cold-blooded execution," police said.

San Mateo authorities on Wednesday charged the teen, a former Hillsdale High School student, as an adult and said he planned a mass murder when he entered the halls Monday morning armed with 10 pipe bombs, a chainsaw and a sword.

They charged him with eight offenses, including attempted murder. He's due in court later Wednesday.

The teen has been in juvenile detention since his Monday arrest on suspicion of attempted murder, igniting destructive devices with the intent to commit murder, and assault with a deadly weapon, according to San Mateo Police Chief Susan Manheimer.

Manheimer said the teenager's "sole intent was to kill, injure or commit mayhem to as many students, staff and faculty as possible," and that the motive was "self-construed revenge."

Police say the teen was angry with the school administration about the grades he got when he attended Hillsdale and with the other students for the way they treated him.

"Our evidence in total indicated this was a cold-blooded execution," Manheimer said.

Click here for video.

Youshock allegedly entered Hillsdale High School just after 8 a.m. Monday wearing a vest outfitted with 10 homemade pipe bombs.

Police say he was also wielding a 2-foot-long sword and a chainsaw and detonated two of the bombs in the building — setting off loud explosions that sent several teachers running to the scene.

No one was injured before the teen was tackled and held down by teachers.

The 1,270 students at the school were evacuated and classes were canceled Monday and Tuesday but are expected to resume Wednesday, KTVU reported.

Investigators said Tuesday they found bomb-making materials that had probably been ordered online in the San Mateo apartment the teen shared with his mother and sister, according to the station.

Sources said the teen told his mother he was making model rockets.

Click here for more on this story from KTVU.com.

The Associated Press contributed to this report.