Swedish officials say a cleaner stole an empty commuter train from a train depot and drove it to a suburb of Stockholm where it derailed and slammed into an apartment building.

Police spokesman Lars Bystrom says the woman was seriously injured in the crash in the early hours of Tuesday and was flown to a Stockholm hospital. No one else was injured.

Bystrom says she was arrested on suspicion of endangering the public.

Tomas Hedenius, a spokesman for train operator Arriva, says the woman, born in 1990, stole the four-car train at a depot outside Stockholm.

She then drove it about a mile (1.6 kilometers) to the end station on the railway line, where it jumped off the tracks and crashed into a three-story building. The motive was unclear.