Venezuela’s government on Monday defended a presidential election that authorities said gave interim leader Nicolas Maduro a six-year term, backtracking on a pledge he had made to permit an audit of ballots demanded by the opposition after the razor-thin victory.

Henrique Capriles, who had challenged Maduro in the Sunday election, which was held six weeks after President Hugo Chavez’s death, insisted that he had won the vote and called for a hand count of all the paper ballots.

Maduro, though, was proclaimed the winner Monday by the National Electoral Council, which certified the victory in a ceremony broadcast on national television, paving the way for his inauguration Friday.

“There is no doubt here about who won the election,” Elias Jaua, the foreign minister and a former vice president, said in a speech in which he defended the election result and characterized the country’s electoral system as the best in the world. “Venezuelans, let’s feel proud of yesterday’s vote.”

Soon after Maduro’s victory was announced Sunday night, Vicente Diaz, one of the rectors of the electoral council, called for an audit of the vote.

Minutes later, Maduro announced to a crowd of supporters outside the presidential palace, “We’re going to do it.”

“We’re not afraid. Let the boxes talk — that the truth be told,” said Maduro, 50, referring to the cardboard boxes that hold ballots.

But by Monday morning, the potent state media apparatus played one interview after another of observers and politicians praising Venezuela’s automated voting system.

And the electoral council — which is made up of five members, four of them allies of the government — made clear that it would not support a recount.

“The Venezuelan electoral system worked perfectly,” said Tibisay Lucena, president of the council. “Venezuela is the country in the Americas with the most lively and vibrant democracy.”

On Monday, though, Capriles declined to concede and cited 3,200 instances of irregularities in the voting process, as well as the use of Venezuela’s well-worn electoral machine to get the vote out for Maduro.

Capriles, 40, said his campaign had asked electoral authorities not to proclaim Maduro the winner pending a hand count of the ballots. He said the opposition’s estimates of the vote showed that he had secured a narrow victory over Maduro.

“Here the fight is not against the people,” said Capriles, a governor and lawyer. “It’s a fight of the people against an illegitimate government.”

He called on Venezuelans nationwide to bang pots and pans in protest — and they did. Some students in Caracas also clashed with National Guard troops, who fired tear gas and rubber bullets.

Francisco Lopez, 29, was among those who congregated in Altamira Plaza in the heart of opposition country. “I don’t know what’s going to happen,” he said, “but we’re going to defend the vote.”

Observers, though, said the opposition’s push had little chance of being heard in a country where the president controls all institutions.

“The abuses of this government, the advantages they have, I’ve never seen it anywhere,” said Ignacio Arcaya, a former diplomat in Chavez’s government who is now in the opposition. “In a country with no judicial independence, how could you expect that there will be any change?”

And Maduro’s response in a televised news conference was to call opposition leaders part of a cabal designed to replace his government with one that would permit the United States to plunder the country.

“Their plan is not a democratic plan but a coup-plotting plan,” Maduro said.

The dispute over the election result came a day after he was expected to garner a resounding victory.

The former union activist turned vice president had the sympathy vote after Chavez died following a long battle with cancer, and some pollsters put ­Maduro’s pre-vote lead in double digits.

But the margin of victory was less than two percentage points, just six months after Chavez beat Capriles by 11 percentage points to win a third six-year term as president. Maduro won, the electoral council said, by more than 260,000 votes

In Washington, White House spokesman Jay Carney called Capriles’s request for an audit of votes an “important, prudent and necessary step” to ensure that Venezuelans have trust in the election result. The Washington-based Organization of American States offered to help Venezuela with a possible audit.

The Venezuelan government rejected such calls as meddling in internal affairs, with officials here instead touting congratulatory messages sent by allies, including Russia, Argentina and Cuba.

Still, the narrow margin of victory was a letdown for many in the government, whose leadership had been predicting a landslide, arguing that a vast majority of Venezuelans supported Chavez’s radical transformation of the country into a socialist state. It means that Maduro will begin his term without the mandate that his boss enjoyed.

“Teflon was limited to Chavez,” said Michael Shifter, president of the Washington-based Inter-American Dialogue, a policy group. “The sympathy for Chavez proved more fleeting than expected. In the end, absent charisma, issues mattered. So do campaigns. Capriles proved adept in taking advantage of a weak opponent and a nation that Chavez left in sorry shape.”

Indeed, even in the high echelons of the Chavista ranks, at least one powerful official appeared troubled by the slim margin of victory. Diosdado Cabello, a former military man with close ties to rich executives who have lucrative state contracts, said, “The results oblige us to make a profound self-criticism.”

The comment was significant because analysts and politicians here view Cabello as Maduro’s rival. And his ties to powerful generals in the military are at sharp odds with the alliances that Maduro has with social groups and with the Cuban government.

Maduro “has the type of background that the military doesn’t always appreciate,” said Javier Corrales, an Amherst College expert on Venezuela. “Some people say that the military never loved the ties to Cuba, and Maduro is very open about his ties to Cuba.”

Corrales said Maduro does not appear to have the kind of ability that Chavez had to hold together the disparate coalition that makes up Chavismo, from the military to radical Marxists, from business executives to armed groups in the slums and the masses of poor.

“The Chavistas, especially in the leadership, are going to say, ‘You’re having trouble maintaining the coalition,’ ” Corrales said. “Chavez, to his credit, was able to put together the most successful coalition between radical leftists and the military.”

Scott Wilson in Washington contributed to this report.