A customer waits to deposit 1000 Indian rupee banknotes in a cash deposit machine at bank in Mumbai, India, November 8, 2016. REUTERS/Danish Siddiqui

India's sudden withdrawal of 500 and 1,000 rupee notes from circulation, in a bid to flush out money hidden from the tax man, caused chaos on Wednesday as gas stations and other retailers refused to accept the larger bills, and bank ATMs stayed closed.

The shock measure also sent shudders through the investment community on a day when the markets were also sent reeling by the prospect of Republican candidate Donald Trump winning the U.S. election, with India's National Stock Exchange share index slumping as much as 6.3 percent in early trade.

The move, announced late on Tuesday night, aims to bring billions of dollars worth of unaccounted wealth into the mainstream economy and curb corruption. It was also designed to stop anti-India militants suspected of using fake 500 rupee notes to fund operations.

From midnight, the larger banknotes ceased to be legal tender for transactions other than exchanging them at banks for smaller notes.

To be effective it had to be unexpected, analysts said, but the abrupt step was fraught with problems for an economy largely fueled by cash, especially for India's poorest citizens, many of whom work in the large rural economy.

"Life is going to become difficult for all from the poorest to the richest" regardless of whether they had declared their wealth or not, columnist Swaminathan Aiyar told news channel ET Now.

"As far as the rural economy is concerned there is going to a huge dry up of purchasing power," he said, adding there will be uncertainty over what notes will be accepted.

Petrol stations and hospitals refused to accept the larger denomination banknotes, even though the government had given them a waiver to continue accepting the bills.

Meanwhile bank ATMs were closed and many are likely to remain shut on Thursday as banks had to prepare for the flood of people seeking to exchange larger banknotes for smaller ones.

In Mumbai, long lines formed at the privately-operated tolls at a major bridge traversing the city as the company, MEP Infrastructure, refused to accept 500 and 1,000 rupees notes.