The 18-year-old, who cost a reported £2.7m, has agreed a five-year contract.
The Montenegro player made his debut in Sweden's top flight in April 2015 when aged just 15 - the second-youngest ever in that league - and has already made more than 70 first-team appearances.
"I'm really happy to be here - it's a dream come true," he said.
Find all the latest football transfers on our dedicated page.
West Ham United have signed teenage attacking midfielder Sead Haksabanovic from Swedish club Halmstads BK for an undisclosed fee.