CARACAS, Venezuela: Nicolas Maduro was sworn in as Venezuela’s president-elect on Thursday, months before he’s due to formally take the oath of office next year for a second term.

The inauguration-like pomp left many confused because Maduro’s next six-year term doesn’t begin until Jan. 10.

The ceremony came at a session of the pro-government constitutional assembly that has largely taken over powers of the opposition-led legislature.

In an address, Maduro defended Sunday’s presidential election, calling it “free and “constitutional” despite being rejected as illegitimate by his leading challenger, the United States and a coalition of Latin American countries.

Official results showed Maduro topping his closest challenger, Henri Falcon, by 47 percentage points. Falcon rejected the vote and called for a new election, accusing Maduro of buying votes of the poor by offering prizes.

Maduro said he recognised troubles facing Venezuelans, yet vowed to press forward with the country’s socialist policies, which have prompted crushing US sanctions.

“I won’t lie,” Maduro said. “Those sanctions will bring serious difficulties, painful difficulties that we will confront head-on, overcome and defeat.”

Oil-rich Venezuela was once among Latin American’s wealthiest nations, but it has sunk into deep economic crisis under Maduro, who replaced his mentor, the late-President Hugo Chavez, in 2013.

In a gesture toward mending Venezuela’s deep divides, Maduro called on a commission under the constitutional assembly to consider releasing some prisoners, without providing details.

In the days following the election, Maduro has expelled two top US diplomats from Venezuela, drawing an equal response from Washington.

Maduro highlighted that at the same time as the ceremony, US Charge D’affaires Todd Robinson and deputy head of mission, Brian Naranjo, were flying out of the country.

Venezuela’s opposition coalition blasted the swearing-in ceremony coming on the heels of what it considers a fraudulent election.

“Two illegitimacies don’t cancel out each other,” the coalition said in a statement, demanding Maduro’s government respect Venezuela’s constitution and its people.