Nearly 62 million Filipinos have registered to choose among 43,500 candidates vying for about 18,000 congressional and local posts, including 81 governors, 1,634 mayors and more than 13,500 city and town councilors in 81 provinces, in one of Asia's most rambunctious democracies.
Final results are expected to be declared in at least a week for national posts and a few days for local positions unless specific outcomes come under protest.
Many see the elections as a crucial referendum on Duterte's rise to power with a brutal crackdown on illegal drugs that has left thousands dead, his unorthodox leadership style, combative and sexist joke-laden outbursts and contentious embrace of China.
"President Duterte's name is not on the ballot but this is very much a referendum on his three years of very disruptive yet very popular presidency," Manila-based analyst Richard Heydarian said.
The outcome will show whether the Filipino populace affirms or rejects Duterte's authoritarian-style leadership in an Asian bastion of democracy, Heydarian said.
Wearing casual clothes, Duterte cast his vote at a school in his hometown in southern Davao city before voting closed at nightfall. He told reporters that he was ready to step down if all his candidates lose.
Asked about his three children, who are running in the elections, Duterte said he wished they would abandon politics. He warned his daughter, Sara, who is running for re-election as Davao city mayor and has been seen as a possible successor for him, that the presidency "will just destroy you."
The most crucial races are for 12 seats in the 24-member Senate, which Duterte wants to fill with allies to bolster his legislative agenda. That includes the return of the death penalty, lowering the age for criminal liability of child offenders, and revising the country's 1987 constitution primarily to allow a shift to a federal form of government, a proposal some critics fear may be a cover to remove term limits.
Military and police forces were on full alert to respond to any violence, especially in security hotspots that include the entire southern region of Mindanao, and to help prevent cheating amid intense local political rivalries.
Two explosions were reported in southern Maguindanao province, including one grenade blast shortly before voting started at 6 a.m. that caused no injuries. In Lanao del Sur province, also in the south, three men in a parked van were arrested after they tried to hurl a grenade at soldiers guarding a voting center in Marantao town. The grenade hit the van's window and exploded in the van, wounding one of the three suspects, who also possessed a homemade bomb, army brigade commander Col. Romeo Brawner said.
Despite pockets of violence, Commission on Elections spokesman James Jimenez said the campaign has been relatively peaceful compared to past years. Police say 20 people have died in poll-related violence.
In Manila's financial district of Makati, former Vice President Jejomar Binay protested after his ballot was rejected by an automated counting machine, one of at least 400 such machines which malfunctioned, Jimenez said.
An AP journalist witnessed ballots jamming in a voting machine, which a poll worker repeatedly banged on and shook until the papers went through. In some instances, the worker had to pull out the ballot, which emerged with its sides badly frayed. The machines were last used in the 2016 presidential election.
"It's not really a show stopper," Jimenez said, adding that the malfunctioning machines were a fraction of about 85,000 used in the elections and would not affect the outcome.
At least two mayoral candidates have been put in police custody elsewhere but one was later freed and allowed to vote. In two southern provinces, gunfire wounded several people, police said.
Opposition aspirants consider the Senate the last bastion of checks and balances given the solid dominance of Duterte's loyalists in the lower House of Representatives.
Last year, opposition senators moved to block proposed bills they feared would undermine civil liberties.
Duterte's politics and key programs, including his drive against illegal drugs that has left more than 5,200 mostly poor urban suspects dead, have been scrutinized on the campaign trail and defended by close allies running for the Senate, led by his former national police chief Ronald dela Rosa, who enforced the crackdown when the president took office in mid-2016.
Aside from the drug killings, Duterte's gutter language and what nationalists say is a policy of appeasement toward China that may undermine Philippine territorial claims in the South China Sea have also been the cause of protests and criticism.
A May 3-6 survey by independent pollster Pulse Asia showed 11 Duterte-backed senatorial candidates and four other aspirants in the winning circle, including only one from the opposition. The survey also showed some favorites had narrow leads and a considerable number of voters were undecided, indicating a chance the results could change. The survey of 1,800 respondents had a margin of error of 2.3 percentage points.
Duterte himself remains hugely popular based on independent ratings surveys.
Divided, cash-strapped and without a unified leader, opposition aspirants are fighting an uphill battle to capture the few Senate seats they need to block any hostile legislation.
Many Filipinos seem more open to authoritarianism due to failures of past liberal leaders, Heydarian said. Such a mindset has helped the family of former dictator Ferdinand Marcos to make a political comeback, including one of his daughters who was running for a Senate seat and was endorsed by Duterte.
Associated Press journalists Bullit Marquez, Joeal Calupitan and Aaron Favila contributed to this report.