RIO DE JANEIRO — A fire at an electricity substation has caused four days of blackouts in most of northern Brazil's Amapa state, disrupting the lives of hundreds of thousands of people.

The outage began Tuesday night when a fire damaged a transformer, interrupting the power supply to 13 of the state's 16 municipalities, including the capital Macapa, the state government said. Amapa state, on Brazil's border with French Guyana, has a total of 850,000 residents.

Nearly 90% of Amapa's population was still without power on Friday morning, according to the state's communications secretary. Thousands of people lined up to fill water jugs and tanks at places in the capital where supply was still available, according to images shown in local press. Most of the population was without telephone service or internet access.

In several markets in the capital, there were long lines to buy bottled water and candles. In many establishments, the products were sold out. At gasoline stations, dozens of cars waited to fill up their cars, fearing a shortage. Authorities are seeking to sustain power supply to ailing hospitals with generators.

Bento Albuquerque, the mines and energy minister, said Friday he expects supply to be fully restored in 10 days. Amapa's sole high-voltage transmission line connected the state to the national grid in 2015. The fire caused the disconnection of Amapa from the regional line and two hydroelectric plants, the state government said.

Brazil's government has launched an investigation into the causes of the incident, mines and energy minister said.