CARACAS, Venezuela (AP) — Venezuela's opposition boycotted a swearing-in ceremony Wednesday for governors held by the all-powerful, pro-government constitutional assembly following disputed elections largely won by ruling party candidates.

Eighteen new socialist governors stood, lifted one hand and pledged to uphold Venezuela's constitution in the ceremony at the assembly's chamber. A painting of the late President Hugo Chavez stood nearby.

Notably absent were the five opposition candidates who won seats in Sunday's regional elections. The opposition's alliance said earlier in the day that it would boycott the session before a body they consider unconstitutional.

"They will only pledge before God and their respective legislative councils," the opposition said in a statement.

President Nicolas Maduro warned before the vote that any new governors would have to take an oath and "submit" to the constitutional assembly — an act opposition candidates said they would never do.

The assembly, which is supposed to rewrite the constitution, was elected in July following an internationally condemned vote the opposition refused to participate in, and officials have given it virtually unlimited powers.

The official announcement that socialist party candidates won 18 of 23 governor races shocked an opposition that had expected to win handily during a time of economic crisis and when polls indicate most Venezuelans disapprove of the government.

Opposition leader Freddy Guevara acknowledged Wednesday the results should provoke "a review and self-critique."

Guevara and other opposition figures have conceded that actual voting records wouldn't likely show fraud, saying the manipulation largely occurred before most voters reached the ballot boxes. Instead, they claim the pro-government National Electoral Council used a series of maneuvers to suppress the opposition vote.

According to Guevara, more than 1 million Venezuelans couldn't vote because their polling sites opened late, closed early or had nonworking voting machines. Thousands more, he said, couldn't reach their voting place because of violence.

The opposition also believes the electoral council's keeping no longer active candidates who lost in a primary on ballots hurt their numbers.

"Modern fraud is sophisticated," Guevara said.

In Miranda, an opposition stronghold surrounding Venezuela's capital won by a socialist candidate, abstention was particularly high. The opposition received nearly 30,000 fewer votes in the city of Baruta alone than it did in 2015.

But how much absenteeism could be blamed on electoral council changes rather than the opposition's own missteps was unclear.

Nicmer Evans, a leftist political scientist, said the opposition struggled with a contradictory message: It had been urging Venezuelans to go out into the streets to protest a government they called a dictatorship, and weeks later called on them to take part in a vote organized by the system that they had just declared illegitimate.

"It's a problem of trust in the opposition's leadership," said Evans, who is also critical of the government.

Socialist victors won many of the races by wide margins, but in at least one case it was evident that electoral council changes likely had an impact.

Electoral officials declared socialist candidate Justo Noguera the winner in the eastern Venezuelan state of Bolivar with an advantage of less than 2,000 votes. But the ballot also included a now-eliminated opposition candidate who received 3,787 votes — more than enough to have swung the victory to opposition candidate Andres Velasquez.

Guevara said that an electoral solution to the nation's crisis is in jeopardy after the vote, as many in the opposition begin to conclude that the National Electoral Council's tactics to sway the vote make it impossible to have a fair election. He said he wasn't calling for violence, but for the opposition to unite in changing the electoral council.

"The fundamental premise from which we have acted has changed," Guevara said. "Now we know that with this electoral system, it's not possible to have free elections."

At the swearing-in ceremony Wednesday, Hector Rodriguez, the new socialist governor of Miranda, promised to create a government "in the style of Chavez" and also seek to win over any detractors who did not vote for him.

"Little by little we are going to heal the hate in your hearts," he told assembly delegates, who cheered and applauded throughout his speech.

Opposition governors who abstained from the ceremony vowed not to let the assembly stop them from taking office.

Nueva Esparta Gov. Alfredo Diaz said he has filed requests in court and to his local legislative council to administer his oath locally but received no response. He defended his choice not to be sworn in by the constitutional assembly.

"There's nothing in the constitution that says it is required," he said. "They just want the five elected opposition governors to legitimize the assembly."

___

Associated Press writer Fabiola Sanchez reported this story in Caracas and AP writer Christine Armario reported from Bogota, Colombia.