The Philippines’ controversial president Rodrigo Duterte appears to have secured a resounding victory in mid-term elections that were billed as a referendum on his hardline, authoritarian rule.

Preliminary results suggest candidates endorsed by Mr Duterte have taken nine of the 12 crucial Senate seats up for grabs in Monday’s vote.

The 24-member Senate has been the most important check on Mr Duterte’s power during his three years in office so far. If the unofficial results are confirmed, it would give the president an effective majority in the upper house and allow him to pursue unencumbered an agenda that includes massive infrastructure spending, the return of the death penalty and even re-drafting the constitution.

With his sexist jokes, foul-mouthed public statements and allegations against him of massive human rights violations, Mr Duterte has been seen as a divisive figure.

But analysts said it was difficult to argue with his personal appeal to voters in the Philippines based on these election results. “This president's popularity and transferability of his popularity [to other candidates] is unprecedented to say the least, despite all the controversies,” said Manila political scientist Edmund Tayao.

The most controversial quotes from Rodrigo Duterte Show all 9 1 /9 The most controversial quotes from Rodrigo Duterte The most controversial quotes from Rodrigo Duterte On killing drug addicts “These sons of whores are destroying our children. I warn you, don’t go into that, even if you’re a policeman, because I will really kill you. If you know of any addicts, go ahead and kill them yourself as getting their parents to do it would be too painful” The most controversial quotes from Rodrigo Duterte Message to China “I will go there on my own with a Jet Ski, bringing along with me a [Phillipino] flag and a pole, and once I disembark, I will plant the flag on the runway and tell the Chinese authorities, ‘Kill me’ ” AP The most controversial quotes from Rodrigo Duterte Christmas message to law-breakers “If you do not want to stop, and just continue committing crimes, then this would be your last Merry Christmas” AP The most controversial quotes from Rodrigo Duterte On sex life “I was separated from my wife. I’m not impotent. What am I supposed to do? Let this hang forever? When I take Viagra, it stands up” AFP/Getty Images The most controversial quotes from Rodrigo Duterte On the drugs trade “None of my children are into illegal drugs. But my order is, even if it is a member of my family, ‘kill him'" AP The most controversial quotes from Rodrigo Duterte Insulting the Pope “We were affected by the traffic. It took us five hours. I asked why, they said it was closed. I asked who is coming. They answered, the pope. I wanted to call him: ‘Pope, son of a wh**e, go home. Do not visit us again’” AFP/Getty Images The most controversial quotes from Rodrigo Duterte Joke about rape “I saw her face and I thought, 'What a pity... they raped her, they all lined up. I was mad she was raped but she was so beautiful. I thought, the mayor should have been first” AFP/Getty The most controversial quotes from Rodrigo Duterte Insulting Barack Obama "Mr Obama should be respectful and refrain from throwing questions at me about the killings, or son of a bitch, I will swear at you in that forum" REUTERS The most controversial quotes from Rodrigo Duterte On Abu Sayyaf Islamic militants "If I have to face them, you know I can eat humans. I will really open up your body. Just give me vinegar and salt, and I will eat you. If you annoy me to the fullest... I will eat you alive. Raw" EPA

The opposition had suffered a “wipe-out” in the election, Mr Tayao said, which also included votes for hundreds of mayors, governors and congressmen across the country. It failed to take any of the 12 up-for-grabs Senate seats, the other three appearing to go to independent candidates.

One of the four remaining incumbent opposition senators, Leila de Lima, is also the biggest public critic of Mr Duterte's anti-drugs crackdown that has seen thousands of suspects killed by police. She has been detained since 2017 on narcotics charges.

Presidential spokesman Salvador Panelo said the Senate's independence would not be in question, but the vote showed the public overwhelmingly backed Mr Duterte and his vision.

“Undoubtedly, the Duterte magic spelled the difference,” he said. “People yearn for stability and continuity of the genuine reforms that this administration started. They yearn for a constructive and not obstructionist Senate.”

The profiles of the successful candidates backed by Mr Duterte are a clear indicator of just how fed up the Philippine public is with previous ineffective progressive leaders.

They include Imee Marcos, the daughter of the late dictator Ferdinand Marcos, as well as former national police chief Ronald dela Rosa, who enforced the president's crackdown on illegal drugs.

With the Senate on his side, Mr Duterte could yet enact his most controversial policy yet. He has spoken previously of rewriting the country's 1987 constitution to allow a shift to a federal form of government.

It is a proposal that some critics fear may be a cover to remove term limits. As things stand, Mr Duterte must step aside in 2022 after serving a single, six-year term.

Strict protections against a return to dictatorial rule were written into the constitution after Marcos was thrown out in a popular revolution. Nonetheless, given his already firm grip on the lower house, Mr Duterte could pass a redrafting of the constitution if he can secure the backing of 18 of 24 senators.

The opposition, which has at times successfully fought Mr Duterte’s attempts to roll back civil liberties and accuses him of risking the Philippines’ claims in the South China Sea by pandering to China, said on Tuesday it will not give up. Official results from the Commission on Election will not be released for around another week.

“Our fight for justice, for sovereignty and a more progressive future for our people continues,” said incumbent opposition senator Francis Pangilinan.