Prime Minister Shinzo Abe sees this month's House of Councillors election as a chance to solidify his grip on power and move closer to achieving his long-held goal of amending Japan's pacifist Constitution.

But as opposition parties look to draw attention to perceived flaws in the public pension programs, he may be reliving memories of a painful 2007 defeat that led to the end of his first stint in power.

The July 21 election for half of the 245 seats in the upper house comes after a government panel recently raised concern over the sustainability of the pension system in a controversial report.

Distrust in the public pension system is a striking similarity between now and the upper house election 12 years ago, when the Liberal Democratic Party and junior coalition partner New Komeito not only lost their majority but also suffered the humiliation of ceding their position as the largest force in the chamber to the since-splintered Democratic Party of Japan.

The crushing defeat came in the wake of blunders by the then Social Insurance Agency as it was revealed that data connected to about 50 million pension accounts had been misplaced.

Related coverage:

Opposition leaders grill Abe over controversial pension report

Abe resigned less than two months later, citing health problems, beginning a period of political instability that saw six prime ministers over a period of six years through 2012. He has said the memory of the defeat has "never left my mind."

The problem this time around is the panel's estimate in its report that the average retired couple would face a shortfall of 20 million yen ($185,000) under the current pension system if they live to be 95 years old.

Abe has called the report "inaccurate" and "misleading," and his finance minister, Taro Aso, insists the government's position remains unchanged that the pension benefits are adequate to serve as the basis of household finances for retirees.

The report, nevertheless, has emboldened opposition parties ahead of the election as they seek to persuade voters that the report shows the pension system is not viable.

"It's certainly having an impact on approval ratings," said Toru Yoshida, a professor of comparative politics at Hokkaido University. "It'll produce an effect like a body blow."

Support for Abe's Cabinet stood at 47.6 percent in a recent Kyodo News poll, down from 50.5 percent in mid-May. Half of respondents said the pension system would be one of the main issues in the upcoming vote.

Despite the furor over the report, however, a fractured opposition and relatively stable economic growth mean Abe and the ruling coalition are likely to retain many of their seats in the upper house, according to Michael Cucek, a professor at Temple University Japan and Waseda University in Tokyo.

(Photo taken from a Kyodo News helicopter shows people gathering in front of Tokyo's Shinjuku station on July 4, 2019, to listen to speeches as official campaigning began the same day for the July 21 House of Councillors election. )

The election "will not change the political landscape. All things being equal, the parties will end up with pretty much the same seat totals as they enjoy now," he predicted.

Upper house elections are held every three years, with their regularity contrasting with the theatrics of House of Representatives elections, which usually follow the prime minister calling a snap vote. The upper house also does not get to determine who becomes premier -- that is the prerogative of the lower house.

But for the LDP, upper house elections have brought unwelcome drama more than once.

The major reversal in 2007 was mirrored in July 1989, when the LDP lost its long-held majority in the upper house to a gaggle of opposition parties including the Japan Socialist Party. The late Takako Doi, the popular head of the JSP at the time, compared the momentous feat to "moving a mountain."

That defeat -- triggered in large part by the unpopular decision to introduce a 3 percent consumption tax and a corruption scandal in which an aide of Abe's lawmaker father, Shintaro, was implicated -- laid the groundwork for the LDP's fall from power in 1993 for the first time in its nearly four-decade history.