The Portuguese president Marcelo Rebelo de Sousa has said several are dead after the Gloria funicular in Lisbon crashed and derailed.
Portuguese emergency services confirmed at least three fatalities and said that at least 20 are injured.
Footage from the site showed the tram-like funicular, which carries people up and down a hillside in the Portuguese capital, destroyed, and emergency workers pulling people out of the wreckage.
Mr de Sousa lamented the tragic accident in a statement, expressing hope that authorities would soon establish what had caused the crash.
The line, which opened in 1885, connects Lisbon’s downtown area near the Restauradores Square with the Bairro Alto, famous for its vibrant nightlife.

It is not immediately clear what caused the funicular to crash
It is operated by the municipal public transport company Carris.
Its two cars are attached to opposite ends of a haulage cable with traction provided by electric motors on the two cars.
The car at the bottom of the line was apparently undamaged, but CNN Portugal said passengers had to jump out of its windows when the incident happened.
It is not immediately clear what has caused the crash.