An Ohio State University student posted a rant shortly before he plowed a car into a campus crowd and stabbed people with a butcher knife in an ambush that ended when a police officer shot him dead, a law enforcement official said.

Abdul Razak Ali Artan, 18, wrote on what appears to be his Facebook page that he had reached a "boiling point," made a reference to "lone wolf attacks" and cited radical cleric Anwar al-Awlaki.

"America! Stop interfering with other countries, especially Muslim Ummah [community]. We are not weak. We are not weak, remember that," the post said.

Two hours before that, a cryptic post on the page said: "Forgive and forget. Love."

Officials cautioned that they have not determined a motive for the ambush, which sent 11 people to the hospital Monday morning. A senior law enforcement official told NBC News that investigators are trying to determine whether Artan had personal problems or something else that might have pushed him over the edge.

A photo of Abdul Razak Ali Artan that accompanied an interview in the OSU publication The Lantern. Kevin Stankiewicz / The Lantern

A police officer was on the scene within a minute and killed the assailant, likely saving lives, university officials said. "He engaged the suspect and eliminated the threat," OSU Police Chief Craig Stone said.

Law enforcement officials told NBC News that Artan was a Somali refugee who left his homeland with his family in 2007, lived in Pakistan and then came to the United States in 2014 as a legal permanent resident.

He lived briefly in a temporary shelter in Dallas before settling in Ohio, according to records maintained by Catholic Charities.

Artan attended Columbus State Community College for two years, graduating cum laude with an associate's degree before moving on to Ohio State to continue his studies. He told a campus publication that on his first day at OSU, he was "kind of scared" to pray in public.

"If people look at me, a Muslim praying, I don't know what they're going to think, what's going to happen," Artan was quoted as saying in the Lantern.

The violence unfolded just before 10 a.m. ET Monday near an academic hall on the Columbus, Ohio, campus, where 60,000 students are enrolled.

Officials said Artan drove onto campus by himself and rammed the car past the curb and into a crowd on the sidewalk.

"This car just swerved and ran into a whole group of people," said Nicole Kreinbrink, who was walking down the street when she saw the car hit people who had evacuated an academic building during a fire alarm.

"All these people were running and screaming and yelling," she added.

Jacob Bowers, an OSU sophomore, was sitting on a bench about 100 feet away when he noticed people running.

"Then I heard someone yell, 'He's got a knife.' And I saw a guy with a big-ass knife just chasing people around. When I saw that, I grabbed all my stuff and started running," Bowers said.

Bowers said he looked back to see a police officer on the scene. The officer yelled to the suspect, "Drop it and get down, or I'll shoot," and then fired on the suspect, Bowers said.

"The man was going insane," he said.

Another student told NBC News that he heard gunfire from his dorm room.

"I heard gunshots from my dorm, probably six or seven," said Stephen Yunker, 18, a freshman who lives two blocks from Watts Hall, where the incident occurred.

He said he and his roommate looked at each other, heard sirens about five seconds later, and then looked out the window.

"We saw fire trucks, couple of cars and a body laying on the ground," he said.

OSU police identified the officer who took down Artan as Alan Harujko, who has been on the force for two years.

The @OSUPolice confirm Officer Alan Horujko shot and killed the suspect, Abdul Razak Ali Artan, Monday morning. pic.twitter.com/6BuZ9GN1zY — OSU Police (@OSUPOLICE) November 28, 2016

The campus was put on lockdown for 90 minutes after the university first reported an "active shooter" in the chaos of the moment.

"Run Hide Fight," the university's emergency management office tweeted. "Continue to shelter in place."

Students hunkered down in classrooms with shades drawn across the 2,000-acre campus.

Lisa Goldstein, 26, was in her Geographical Information Systems class in Stillman Hall when a text alert hit everyone's phones. The students blocked the door with their book bags and monitored social media and live streams for updates.

"It's a little overwhelming and scary. It's not something you think would happen on our campus," she told NBC News.

A witness prays on the Ohio State University campus close to the scene of the attack. Adam Cairns / Zuma Press

Ohio Gov. John Kasich praised law enforcement for stopping Artan before he could do more harm.

"Think about what this tragedy could have meant, a man with a butcher knife and who knows what else?" he said.

President Barack Obama was briefed on the attack, a White House spokesman said. The FBI is assisting in the investigation.

Hassan Omar, president of the Somali Community Association of Ohio, told NBC News that reports that the attacker was Somali were upsetting.

"Every Somali person has been calling me, and everybody is crying," he said.

"This is a shock," he added. "As a Somali community here, we are in a state of shock. In Columbus, we live in a very peaceful community. This is going to affect the life of everybody. We are American, and we don't want somebody to create this problem."