All of Martha’s Vineyard lost power for about four minutes Tuesday night because of device failure at a substation in Falmouth, according to an Eversource spokesman.

The entire Island was pitched into darkness for a short period just before 8 p.m. Tuesday. According to Eversource spokesman Michael Durand, the power failure extended to about 5,000 customers in Falmouth.

Mr. Durand said in an email that the power outage was caused by the failure of a device called a lightning arrester at a main substation in Falmouth. The device failure caused a power line to go offline when it sensed the problem, he said, which is normal operation to protect the line.

“We were able to quickly reroute power to another line, which was why the outage was so brief,” he said.