PALMDALE, Calif. (Reuters) - A 14-year-old boy shot and wounded a student at a Southern California high school on Friday before fleeing the scene and being arrested at a supermarket by an off-duty police officer, law enforcement officials said.

The victim, a 15-year-old student at Highland High School in Palmdale, about 60 miles (96 km) north of Los Angeles, was listed in stable condition at a nearby hospital with a gunshot wound to the arm and shoulder area, Los Angeles County Sheriff Jim McDonnell told a news conference.

Officials had initially said the victim was 14 years old.

The suspect, a former student at Highland High School, was taken into custody at a supermarket by an off-duty Los Angeles police officer after the boy called his father to tell him that he had fired a gun into the air, McDonnell said.

The suspect was expected to face attempted murder charges, McDonnell added. The weapon used, an SKS rifle, was found discarded in a field, McDonnell said.

Law enforcement officials did not offer a motive for the incident, which took place at about 7 a.m.

The sheriff’s department on its Twitter account called it an “isolated shooting.”

Slideshow ( 3 images )

The shooting prompted an immediate lockdown at the school.

“We are incredibly grateful for the actions of Highland High School teachers and staff and our first responders who courageously protected the lives of our students today,” Brett Neal, an assistant superintendent for the school district, said in a statement. “We know that every second is important in a situation like this and we couldn’t be more thankful.”

Initial reports of a possible school mass shooting drew immediate attention from major news outlets and cable TV networks. It underscored the national debate over gun control and gun rights that intensified after the February shooting deaths of 17 students and staff members at Marjory Stoneman Douglas High School in Parkland, Florida.

Palmdale, a city of about 160,000 people that calls itself the “aerospace capital of the United States,” is home to an Air Force aircraft manufacturing plant that includes production facilities operated by Boeing Co, Lockheed Martin Corp and Northrop Grumman Corp.