The accident occurred late on Friday local time when the driver of a bus with 30 people on board lost control of the vehicle on a road in the northeastern state of Pernambuco.
The driver escaped with minor injuries and the test results showed that he was not under the influence of alcohol at the time.
In an early stage, it was reported that 15 people had died, but late on Saturday evening, it was announced that two more had died. The condition of the other passengers is unclear.
"I would like to express my deepest condolences and my solidarity to the families and friends of the deceased in this very painful moment", writes the country's president Lula da Silva, in a post on X.