The gunman is believed to be among those killed and a search is continuing at the school for other possible victims, the local police chief told a press conference.
The perpetrator's motive was not immediately known.
Police have opened a probe into murder, arson and an aggravated weapons offence after a shooting. (AP PHOTO)
"We know that 10 or so people have been killed here today. The reason that we can't be more exact currently is that the extent of the incident is so large," local police chief Roberto Eid Forest told reporters.
Forest said police believed the gunman had acted alone and that they did not currently suspect terrorism as a motive, although he cautioned that much remained unknown.
He said the suspected gunman had not previously been known to police.
"We have a big crime scene, we have to complete the searches we are conducting in the school. There are a number of investigative steps we are taking: a profile of the perpetrator, witness interviews ... Obviously, it's a significant amount of work." he said.
Police said they had opened an investigation into murder, arson and an aggravated weapons offence and that the search for possible further victims had continued into the evening.
The shooting took place in Orebro, 200km west of Stockholm, at the Risbergska school for adults who did not complete their formal education or failed to get the marks to continue to higher education.
It is located on a campus that also houses schools for children.
"It is a very painful day for the whole of Sweden," Prime Minister Ulf Kristersson said on X.
"My thoughts are (also) with all of those whose normal school day was turned into fear. Being locked up in a classroom fearing for your life is a nightmare no one should have to experience."
Maria Pegado, 54, a teacher at the school, said someone threw open the door to her classroom just after lunch break and shouted to everyone to get out.
"I took all my 15 students out into the hallway and we started running," she told Reuters by phone.
"Then I heard two shots but we made it out. We were close to the school entrance."
"I saw people dragging injured out, first one, then another. I realised it was very serious," she said.
A hospital spokesperson told Reuters that out of five patients admitted at the Orebro University Hospital, one had light injuries while four were operated on.
Two of the latter were out of surgery and stable while one had serious injuries.
Police said students had been kept indoors at the school that was targeted and at other schools nearby for their safety.
Police later began helping those who had taken shelter to leave.
Sweden has been struggling with a wave of shootings and bombings caused by an endemic gang crime problem but fatal attacks at schools are rare.
with AP