DIXON, Solano County (CBS SF) — Police arrested a 15-year-old Dixon High School student who exchanged gunfire with an officer Wednesday morning, according to police and the Dixon Unified School District.

A student alerted Dixon High School Principal Nick Girimonte at about 9 a.m. Wednesday that another student was armed with a handgun in nearby Hall Memorial Park, school district officials said on Facebook.

READ MORE: Man Who Spent 46 Years In Prison Wrongly Convicted of San Francisco Rape, Murder Finally Exonerated

The school contacted police, who responded to the park. When one of the officers arrived, the student came up behind the patrol car and opened fire, striking the car multiple times, Dixon police Chief Jon Cox said.

“It was very fortunate the officer was not struck,” Cox said.

The officer got out of the car and returned fire and the student tried to run. Other officers arriving at the park ordered him to the ground and he was safely arrested, police said.

The student had apparently been hit in his torso by the officer’s gunfire and was taken to a hospital for treatment.

READ MORE: Massive Caldor Fire 100% Contained After Threatening Lake Tahoe Region

He was later released from the hospital and booked into a juvenile detention facility in Fairfield on suspicion of attempted murder of a police officer, Cox said.

The school, located at 555 College Way, was placed on lockdown as police responded. The school is providing counseling support for students today, district officials said.

“It was a good example of how important it is for the school district and law enforcement to work together,” Cox said. “Because of their diligence in immediately notifying us, we were able to take this person into custody without any further violence.”

© Copyright 2014 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

MORE NEWS: Two Unhoused Men Shot, One Dies in East Oakland

[display-posts category=”trending” wrapper=”ul” posts_per_page=”6″]