MERCED, Merced Co. (CBS/AP) — A student stabbed and wounded four people as classes got underway at a rural university campus in central California before police shot and killed him, authorities said Wednesday.

Two students, one staff member and a vendor were attacked at the University of California, Merced, but were expected to recover, the school said on its verified Twitter account. Campus officials reported earlier in the day that five people were stabbed.

All the victims were conscious when paramedics reached them, Assistant Vice Chancellor Patti Waid said. Two of them were taken by helicopter to hospitals in Modesto, but their conditions were not immediately known. The three others had injuries that were minor enough that they could be treated on campus, Waid said.

Campus officials said the assailant was a student but had not confirmed his identity or provided a motive for the attack. Officials said they were still working out a timeline of events leading up to the stabbings, and it wasn’t clear how the attack played out.

University senior Phil Coba, a student government representative, said numerous students told him that the stabbings started inside a classroom and continued outside before campus police shot and killed the attacker.

Authorities have not confirmed those accounts and have said the attack occurred outside a building as students went in to class shortly after 8 a.m.

Student Alex Lopez was heading to class when he realized something was wrong on campus.

“I was listening to a podcast, and there was a break in talking, and I just hear a gunshot,” he said.

He said police and first responders flooded the scene.

“You see this stuff all over the news and stuff and you see it happen to all these other schools,” but you don’t expect it to happen at your school, said Lopez, 21.

The university about 120 miles south of Sacramento in the farm-rich San Joaquin Valley was locked down for about an hour and a half after the stabbings. The lockdown was lifted, but classes were canceled and entrances to the campus were blocked off.

Campus officials said the university, which has about 6,000 students, also would be closed Thursday and urged the community to seek counseling services that were available.

The campus in the city of Merced opened a decade ago and is the newest college in the University of California system.

It was erected in the state’s farm belt in response to the burgeoning enrollment in the nine other University of California campuses. Regents also felt the mainly agricultural region was unrepresented by higher education.

© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.