Police said the driver, a 26-year-old South Portland man, was trapped inside the vehicle and had to be freed by firefighters.