The incident occured at a school in Alvik, western Stockholm on Monday afternoon.
"The man is believed to have hit someone in the back, but the person had a backpack on," Kjell Lindgren of the Stockholm police told the Aftonbladet newspaper.
The Dagens Nyheter newspaper reported that there were two attackers, both men, and that one swung an axe at nearby students.
The other is reported to have had a baton, although the Aftonbladet newspaper reported that it may have been a tazer.
The men, aged 17 and 49, were easily identifiable by onlookers, and police were able to arrest one of them inside his home. The other was arrested in central Stockholm soon after.
The two men are now suspected of attempted aggravated assault and racial agitation (hets mot folkgrupp), after they are said to have yelled racial abuse at the time of the attack.