TOKYO — A powerful earthquake struck Japan’s northern island of Hokkaido on Thursday, causing millions of homes to lose power, killing at least 17 people and leaving 26 others missing after a landslide crushed multiple houses.

The quake, which toppled some small buildings and cut electricity to all three million houses on the island, came just days after the largest typhoon to hit Japan in 25 years ripped through the southwest, killing 11 and closing Japan’s third busiest airport for several days.

In Hokkaido on Thursday, rescue workers were struggling to get to the homes crushed by a mudslide in the towns of Atsuma and Abira after the quake, which struck just after 3 a.m. Japan’s weather service said it had a preliminary magnitude of 6.7.