Prime Minister Shinzo Abe cruised to victory in the ruling Liberal Democratic Party’s leadership election Thursday, securing a historic third term that will effectively extend his time in power by another three years.

Abe comfortably beat his only contender, former Defense Minister Shigeru Ishiba, by securing 553 out of a total 807 votes. He won 329 out of the 402 valid ballots cast by LDP members of the Diet, and 224 out of the remaining 405 votes allocated to the LDP’s prefectural chapters based on the number of members age 18 or older who have paid party fees.

Although he lost the election, Ishiba put up a decent fight, bagging 181 regional votes — or 44.6 percent of the total cast by prefectural branches. This made the Abe campaign barely meet its own self-imposed goal of winning 55 percent of such votes. Seventy-three LDP lawmakers voted for Ishiba.

Abe’s extended term in office signals the possibility that the prime minister, who has already been at the helm of the world’s third-largest economy for nearly six years in his second stint as premier, may become the longest-serving prime minister in Japanese history.

But several challenges lie ahead.

His first major test will come next summer, when the triennial Upper House election is slated to take place. A failure by the ruling coalition to survive the poll with their current two-thirds “supermajority” intact could significantly erode Abe’s power base and might all but doom his longtime quest to amend the Constitution.

“I consider the result to be an encouraging message from voters that I should further exert my strong leadership abilities for the public and the nation over the next three years,” Abe said, while touting the economic, diplomatic and national defense policies he has delivered since retaking office in 2012.

The two-week race to pick the LDP’s next president — and therefore the prime minister — was a relatively low-key affair due to the widely held notion that Abe, having secured the backing of five out of the party’s seven factions, would be re-elected anyway.

The overwhelming clout Abe holds over LDP parliamentarians had left Ishiba to pin his hopes on support from rank-and-file party members.

With little drama over who would win the race, Abe’s margin of victory was the primary focal point of election results. Observers believed a resounding win over Ishiba would defuse any potential for “Abe fatigue” to set in within the LDP and prevent him from becoming a lame-duck leader.

Earlier, senior LDP lawmaker and former economic revitalization minister Akira Amari, who served as director-general of the Abe campaign, had said the prime minister has to win at least 55 percent of ballots allocated to prefectural branches — which is what Ishiba managed to rack up when he competed with Abe in the party’s last presidential election in 2012.Even though it is likely the goal was deliberately set low to save Abe from any embarrassment, the prime minister only barely met that target on Thursday, winning 55.3 percent of such votes.

“I think the result proved the LDP is not all monolithic,” Ishiba told reporters after the vote wrapped up.

“Given so many rank-and-file members of the LDP showed support for me, I think it’s my responsibility to make sure that their voice will be reflected in the new leadership,” he said.

LDP lawmaker Masaaki Taira, who belongs to Ishiba’s faction, hailed the outcome of the poll.

“It’s a shame that we couldn’t win. But we won many more votes from rank-and-file members than predicted by media. … So I would say we did really well,” he said.

With his renewed leadership, Abe told the news conference that he will reshuffle his Cabinet soon after returning from his upcoming trip to the United Nations General Assembly in New York. The shake-up will reportedly take place as soon as early October. Given Ishiba’s better-than-expected showing, whether Abe will assign the longtime rival to any major post is a point of attention. Abe said he wants to employ a “diverse” range of talent for the new Cabinet but declined to clarify what to do with Ishiba, only saying he will “put the right people at the right places.”

Also at issue is what will happen to Taro Aso, who holds the posts of deputy prime minister and finance minister and is a longtime Abe ally. Aso came under intense fire earlier this year after his ministry became embroiled in document-tampering and sexual harassment scandals, which ignited fierce calls by the opposition for his resignation and dented the Abe administration’s popularity. At the same time, Abe may be reluctant to let go of his close ally as Japan prepares to host the Group of 20 leaders summit in Osaka next year.

“It’s true that the Finance Ministry had an institutional crisis. … But I still think Mr. Aso is the only person who can rehabilitate the ministry and push forward our financial policies,” Abe said in a public debate with Ishiba during the campaign.

Whether or not agricultural minister Ken Saito will retain his post is also being watched. Saito, who belongs to Ishiba’s Suigetsukai faction, stirred controversy toward the end of the campaign period by revealing that he was told by someone from the Abe campaign to quit the portfolio if he wants to continue to back Ishiba. Saito’s postelection fate could be a barometer of whether Abe intends to give the cold shoulder to those aligned to Ishiba in his power balance strategy going forward.

One surprise during the race was “star” LDP politician Shinjiro Koizumi, son of charismatic former Prime Minister Junichiro Koizumi, declaring at the last minute his support for Ishiba. Prior to Thursday, Koizumi — who is deemed influential enough to sway the decision of swing voters — had been silent on which candidate he would support, apparently to avoid disrupting the race.

“Going forward, the LDP has to learn not to suppress a minority voice, but turn such a voice into its own strength. That’s the kind of mindset that made me vote” for Ishiba, Koizumi told reporters.

On Wednesday evening, the last day of the campaign period, a confident Abe addressed a large audience gathered in front of Akihabara Station in Tokyo to tout his LDP presidential bid one last time.

His allies, including Aso and Amari, repeatedly touted him as the “face” of the nation, saying that he has elevated the country’s global presence to a level unthinkable when Japan was plagued by “revolving door” prime ministers.

” ‘Well, if Shinzo says so …’ has now become a favorite phrase on the global stage,” Amari claimed, saying world leaders now trust Abe heavily for his advice.

Abe has credited himself with “restoring a decent economy” under his Abenomics policy and taking the Japan-U.S. alliance to a stronger level. He also repeated that it’s the “responsibility of the LDP” to revise the war-renouncing Article 9 of the Constitution to formalize the ambiguous status of the Self-Defense Forces — the nation’s de facto military — which he said “protects the peace and independence of Japan.”

During the campaign Ishiba, meanwhile, accused Abenomics of having failed to “trickle down” its benefits to small businesses, particularly those in rural areas. As an alternative, Ishiba said he wanted to better invigorate regional firms and sectors such as agriculture and fisheries that are overlooked — which he said would go a long way toward revitalizing the economy.

Staff writer Sakura Murakami contributed to this report.