– Shinzo Abe declared victory in national elections Sunday, ensuring his place in history as Japan's longest-serving prime minister at a time when the country faces numerous challenges, including a rapidly aging population, tensions with its neighbors in Asia and coming trade talks with an unpredictable counterpart in the White House.

Official results are not expected until Monday, but public broadcaster NHK said that Abe's conservative governing coalition had won a majority of seats in the upper house of Parliament.

But in a setback for Abe in an otherwise victorious election, his coalition did not secure the number of seats needed to fulfill his long-cherished ambition of revising a pacifist constitution that has been in place since American occupiers created it in 1947.

"We have been able to gain a majority," Abe said as results were being tabulated Sunday night. "And I believe that the voters wanted a stable foundation in politics."

The projected result, in which Abe's Liberal Democratic Party and its allies hold on to power, represented a striking moment for the prime minister. A dozen years ago, he was forced to resign in disgrace after one year as prime minister, following a humiliating defeat of his party in a parliamentary election. Now, Abe, who returned to power in 2012 and has presided over an extended period of political stability, is just four months shy of setting Japan's leadership record.

Abe tried to play down the significance of not capturing enough seats to initiate constitutional revision. "This is not about whether or not we gain the two-thirds majority," Abe said. "This is whether or not we can have a stable ruling bloc."

Yet the failure to win a supermajority thwarts one of Abe's signature goals. The constitution calls for the renunciation of war, and Abe has long stated his desire to change it to allow Japan to strengthen its military.

During the campaign, Abe did not emphasize his desire to revise the constitution. Rather, he focused on promising to secure the country's finances and touted his personal relationship with President Donald Trump, while questioning the ability of any of several opposition parties to govern effectively.

"We have been saying do you want a stable government or chaos?" he said Sunday.

Abe's electoral victory came despite his struggles to accomplish his other professed goals, including turbocharging the economy, raising the country's sluggish birthrate and drastically increasing the proportion of women in management and politics.

In many ways, Abe's success stems from the lack of a strong opposition rather than public support for his agenda.

"The opposition is no good," said Makoto Mugikura, 68, a voter who had wandered into Abe's final campaign rally Saturday night because he had happened to be in the neighborhood. "There is nothing but the Liberal Democrats."

NHK reported that voter turnout, below 50%, was the second lowest in the history of elections for the upper house of parliament. Heavy rain in southern Japan may have suppressed some voting, but resignation may have also been a factor. "They just don't feel their vote makes a difference," said Donna Weeks, a professor of politics at Musashino University.

Some analysts said the media had also given short shrift to campaign coverage, which contributed to voter disinterest. "A lot of people abstain because they don't even know that an election is going on," said Koichi Nakano, a political scientist at Sophia University in Tokyo.

Abe has established himself as a leader on the world stage, persistently courting Trump and working to improve ties with President Xi Jinping of China.