CARACAS, Venezuela -- Venezuelan opposition leader Henrique Capriles announced Sunday night that he will run in elections to replace Hugo Chavez, setting up a make-or-break encounter against the late president's hand-picked successor.

Capriles slammed the government in his announcement for using Chavez's death to push the candidacy of Nicolas Maduro, who was sworn in as acting leader Friday. He also called top military brass an "embarrassment" for publicly supporting Maduro, although the constitution forbids the military from taking political sides.

"Don't fool yourselves that you're the good and we're the bad," the 40-year-old candidate said to the government. "No, you're no better than us. I don't play with death. I don't play with pain."

Capriles, who is governor of Venezuela's biggest state, also acknowledged that he faces tough odds against an official candidate in control of vast public resources who he said has the backing of the country's electoral commission.

"As one person said today, 'Capriles, they are taking you to a slaughterhouse. Are you going to be lowered into its meat grinder?"' Capriles said.

He said, however, that he had to fight for the whole country.

"How am I not going to fight?" he said. "How are we not going to fight? This is not Capriles' fight. This is everybody's fight."

In some districts of the capital, people launched fireworks, shouted and honked horns as Capriles announced he would run.

Capriles also laid out what could be main themes of his campaign, bemoaning high crime and poverty as well as the government's decision to devalue the currency by more than 30 per cent.

National Assembly President Diosdado Cabello sent a response on his Twitter account: "Capriles, you messed with Chavez and with the profound love that the people feel for the Commander of the Fatherland, you made a declaration of war."

Venezuela's election commission has set the vote for April 14, with formal campaigning to start just 12 days earlier.

Maduro has already announced his intention to run as the candidate of Chavez's socialist party. On Sunday he also picked up the support of Venezuela's small communist party. He's expected to file election papers on Monday.

In a speech accepting the communist party's nomination, Maduro insisted he was running for president out of loyalty to Chavez, not vanity or personal ambition, and called on the people to support him. Chavez chose him as vice-president after winning re-election October.

"I am not Chavez," Maduro said, wearing a simple red shirt. "In terms of intelligence, charisma, historical force, or capacity to lead. ... But I am a Chavista and I live and die for him."

Opposition critics have called Maduro's ascension unconstitutional, noting the charter designates the National Assembly president as acting leader if a president-elect cannot be sworn in.

Capriles faced a stark choice in deciding whether to compete in the vote, which most analysts say he is sure to lose amid a frenzy of sympathy and mourning for the dead president.

Some say a second defeat for Capriles just six months after he lost last year's presidential vote to Chavez could derail his political career. But staying on the sidelines would have put in jeopardy his leadership of the opposition.

Analysts predict the next five weeks will see a spike in the nasty, heated rhetoric that began even before Chavez's death Tuesday after a nearly two-year fight with cancer.

Political consultant Oswaldo Ramirez, who is advising the Capriles campaign, said the candidate must strike a balance between criticizing the failures of Chavez's government and Maduro's role in it, without being seen as attacking the late president.

"He can't speak badly of Chavez, because this feeling on the street is still in full bloom," Ramirez said.

Public opinion was as divided as always Sunday in a country that became dramatically more polarized during Chavez's 14-year rule.

"It's not fair," said Jose Mendez, a 54-year-old businessman of the choice the opposition leader faces. "(Maduro) has an advantage, because of everything they have done since Chavez's death, all the sentiment they've created ... But the guy has nothing. He can't hold a candle to Chavez."

But Ramon Romero said the opposition was just making excuses, and had no chance of victory in any case.

"Now their odds are even worse," said the 64-year-old waiter and staunch Chavez supporter. "They don't care about anyone, and we (the voters) have been lifted out of darkness."