Most of the victims, trapped inside the carriage, were taken to hospital but no one was badly hurt, officials on site added.
Portuguese Civil Protection said on its website 64 rescuers and 24 emergency vehicles had been involved in the rescue operation.
Carris, the tram company said, a full investigation to the accident will take place.