In a stunning political setback for Prime Minister Yoshihide Suga on his home turf, opposition party-backed Takeharu Yamanaka defeated seven other candidates in the race to become Yokohama mayor.

The victory by Yamanaka, 48, who was endorsed by the Constitutional Democratic Party of Japan and received the support of other major opposition parties, was a crushing personal and political blow for Suga. The prime minister, who represents a district in Yokohama in the Lower House, had thrown his support behind his longtime friend and supporter, former National Public Safety Commission chair Hachiro Okonogi, 56.

Yamanaka’s victory also puts the brakes on Yokohama’s efforts to host a casino resort in the city’s waterfront Yamashita Pier district. Of the eight candidates, six, including Okonogi and Yamanaka, opposed the plans, approved by the Yokohama Municipal Assembly and outgoing Mayor Fumiko Hayashi, 75, who was one of two candidates running in support.