A woman was crushed to death on Wednesday when an elevator began moving to a higher floor as she was stepping on board, authorities said.

The accident occurred in a 25-story office building near Grand Central Terminal, according to the fire department.

The woman was about halfway into the elevator when it shot upward and crushed her, a fire department spokeswoman said.

It was not clear how far the elevator moved before stopping. Two other people inside suffered minor injuries.

The cause of the malfunction is under investigation.

The building houses a number of the advertising agencies that are clustered along Madison Avenue in midtown Manhattan.

(Reporting by Aman Ali, Editing by Ellen Wulfhorst and Greg McCune)