The ruling Liberal Democratic Party was dealt a crushing blow Sunday after losing the Lower House by-elections in Okinawa and Osaka, viewed as a harbinger for the Upper House election just a few months away, Kyodo News projections showed.

The loss of both national races in the second wave of the unified elections marked a significant setback for Prime Minister Shinzo Abe, who doubles as head of the ruling party.

It is the first time the LDP has lost a national by-election since Abe’s second term began in 2012, excluding the uncontested Lower House by-election in Kyoto Prefecture in 2016.

The by-elections for the No. 3 constituency in Okinawa and the No. 12 district in Osaka were won by freelance journalist Tomohiro Yara, who was backed by opposition parties, and by Fumitake Fujita of Nippon Ishin no Kai, respectively. The House of Councilors election is scheduled for July.

The losses revealed dissatisfaction with the administration, said a senior lawmaker from Komeito, the ruling LDP’s coalition partner.

But some in the LDP said the losses were expected because of the particular local interests in Okinawa and Osaka. Still, one veteran member said the public’s memory of the losses would fade after the unusually long 10-day Golden Week holiday, suggesting it would have a limited impact on the Upper House election.

In Okinawa, home to the bulk of U.S. military facilities in Japan, pro- and anti-base candidates vied for the House of Representatives seat left vacant by Denny Tamaki, who is now governor.

Yara, 56, is opposed to Okinawa hosting U.S. Marine Corps Air Station Futenma.

“The relocation to Henoko is not a solution,” Yara said after his victory became certain. The Okinawan people’s will was clearly evident given the results of the election.

Tamaki, who supported Yara as his successor in the district, said he wants to solve the Futenma issue as soon as possible through discussions with Tokyo and Washington.

The LDP’s Aiko Shimajiri, 54, who used to be minister in charge of Okinawa and Northern Territories affairs, had supported a bilateral plan to move the base from a crowded residential area in Ginowan to the less-populated coastal district of Henoko in Nago, which makes up part of the constituency.

The two by-elections were part of a wave of hundreds of other races to pick mayors and assembly members in cities, towns and villages nationwide on Sunday.

Abe’s LDP was hoping to build momentum in the run-up to the Upper House poll and mitigate the negative impact of two of his Cabinet members who resigned over controversial remarks.

In Osaka, the LDP and its coalition partner, Komeito, faced off against Nippon Ishin no Kai, which has seen strong local support for its plan to streamline the major western city’s administration by creating a metropolis akin to Tokyo.

Fujita, 38, of Nippon Ishin, competed against the LDP’s Shinpei Kitakawa, 32, who was also supported by Komeito, and two other candidates in the Osaka No. 12 district.

The by-election was held following the death of former Deputy Environment Minister Tomokatsu Kitagawa.

Sunday’s vote comes after Olympics minister Yoshitaka Sakurada stepped down earlier this month over remarks he made deemed offensive to people affected by the March 2011 earthquake and tsunami and ensuing Fukushima nuclear crisis.

Abe’s effective firing of Sakurada came after deputy land minister Ichiro Tsukada quit on April 5 over remarks that suggested he had acted in the interests of the prime minister’s constituency on a road project.

The vote also comes as the outlook for Japan’s economy, which has enjoyed modest growth, has become increasingly uncertain due partly to trade frictions between the United States and China.

A close aide to Abe hinted Thursday at the possibility of another delay in the consumption tax hike, scheduled for October from 8 percent to 10 percent, depending on a key quarterly business sentiment survey by the Bank of Japan to be released on July 1.

Tax hikes are often unpopular among Japanese voters, but Abe sought approval in a Lower House election in 2017 to use part of the revenue to enhance child care support.

In the first round of the unified elections on April 7, the LDP won a gubernatorial race in Hokkaido and a majority of prefectural assembly seats, but the results revealed party divisions in some regional areas.