By Andrew Cawthorne

CARACAS (Reuters) - Ridiculing the U.S. qualification of Venezuela as a security threat, President Nicolas Maduro said on Thursday he may travel to Washington to challenge American counterpart Barack Obama.

"We demand, via all global diplomatic channels, that President Obama rectify and repeal the immoral decree declaring Venezuela a threat to the United States," Maduro said.

In the worst flare-up between the ideological enemies since Maduro took power in 2013, Washington earlier this week declared a "national emergency" over "the unusual and extraordinary threat" from Venezuela and sanctioned seven officials over allegations of rights abuses and corruption.

The Maduro government has demanded evidence of how it threatens U.S. security. Conversely, it accuses Washington of helping coup plotters and preparing a military invention.

U.S. officials say the Obama government's intention is to make Venezuela's government change its ways, not fall.

Speaking at a book fair, Maduro, the 52-year-old successor of firebrand U.S. adversary Hugo Chavez, said Venezuela was preparing an event in Washington to press its case.

"Maybe I'll appear in Washington at that exhibition, to show my face for my country and tell the government in Washington they are committing grave mistakes," he said.

No more details of the event were given.

With Venezuela also demanding that the United States slash its Caracas embassy from 100 to 17 staff, the dispute has dominated local headlines and overshadowed an economic crisis.

Opposition leader Henrique Capriles accused Maduro of using the spat as a smokescreen. "Inflation through the roof. Scarcities too. Murders and poverty up. And the shameless rulers talking to us of an invasion," he tweeted.

Venezuela's opposition coalition has sought to disassociate itself from any perception of supporting outside meddling, while supporting the allegations of repression and graft.

Allies from Russia to Argentina have sent messages of support to Venezuela, as has the South American regional bloc UNASUR, while critics of U.S. foreign policy have protested.

Story continues

"Venezuela is one of the very few countries with significant oil reserves which does not submit to U.S. dictates," wrote Glenn Greenwald, the journalist who first published documents leaked by fugitive former U.S. spy contractor Edward Snowden.

"Such countries are always at the top of the U.S. government and media list of 'Countries To Be Demonized'," he said.

Whipping up nationalist sentiment, Maduro addressed an "anti-imperialist" march on Thursday, while at the weekend the National Assembly is expected to grant him special decree powers he says are needed after the U.S. moves.

(Editing by Jeremy Laurence)