* Tropical cyclone weakens to 'depression' on Saturday
* At least 17 people killed in India and Bangladesh
* More than 1,000 houses damaged in Bangladesh
* Infrastructure hit in parts of India's Odisha state (Updates Bangladesh toll, adds storm and evacuation details)
By Jatindra Dash and Ruma Paul
DHAKA/BHUBANESWAR, India, May 4 (Reuters) - The strongest cyclone to hit India in five years killed at least 12 people in eastern Odisha state before swinging north-eastwards into Bangladesh on Saturday where five more people died and more than a million were moved to safety.
Tropical cyclone Fani, which made landfall early on Friday, lost some of its power and was downgraded to a 'Depression' by the India Meteorological Department on Saturday as the storm hovered over Bangladesh.
"The fear of a major disaster is mostly over as (Fani) has weakened," Shamsuddin Ahmed, director of the Bangladesh Meteorological Department, told reporters.
A storm surge still breached embankments to submerge dozens of villages on Bangladesh's low-lying coast, a disaster ministry official in Dhaka said.
The storm also destroyed several houses in the Noakhali district, where a two-year-old child and a 12-year-old girl were killed and about 30 people were injured, local official Tanmoy Das told Reuters.
In all at least five people had been killed, 63 injured, and more than the 1,000 houses had been damaged, Bangladeshi authorities said.
In India, authorities were assessing damage left behind by Fani, which had spent days building power over the northern reaches of the Bay of Bengal before tearing into Odisha.
Indian media reported that at least 12 people had died across the state, with most deaths caused by falling trees, but a mass evacuation before the tropical cyclone made landfall averted a greater loss of life.
The seaside temple town of Puri, which lay directly in the path of Fani, suffered extensive damage as winds gusting up to 200 kph (124 mph) tore off tin roofs, snapped power lines, and uprooted trees on Friday.
"Destruction is unimaginable... Puri is devastated," Odisha's Special Relief Commissioner Bishnupada Sethi told Reuters, adding that 116 people were reported injured across the state.
Video footage taken from an Indian navy aircraft showed extensive flooding in areas around Puri, with wide swathes of land submerged in the aftermath of the storm.
Odisha Chief Minister Naveen Patnaik said the electricity infrastructure in Puri and parts of an adjoining district had been completely devastated.
"We have the challenge of having to set up the entire electrification afresh," he told reporters.
At least six people died in Bhubaneswar, Odisha's state capital, where fallen trees blocked roads and electricity supply was hit.
Ashok Patnaik, director of Capital Hospital, one of the largest state-run hospitals in Bhubaneswar, said it had received four dead bodies on Friday and two on Saturday. "All are cyclone related," he said.
Prime Minister Narendra Modi, who is in the midst of a general election, said in a tweet that he would visit Odisha on Monday.
The cyclone season in the Bay of Bengal can last from April to December, and some storms can be deadly. In 1999, a super-cyclone battered the coast of Odisha for 30 hours, killing 10,000 people.
Since then, technological advances have helped weather forecasters track the cyclones more accurately, giving authorities more time to prepare, and a mass evacuation of nearly a million people saved thousands of lives in 2013.
This time, as cyclone Fani approached, Odisha moved 1.2 million people to safety in 24 hours, which Patnaik described as "one of the biggest human evacuations in history".
Shelters were set up in schools and other safe buildings to accommodate the evacuees, who included scores of tourists.
More than 100,000 government officials, 45,000 volunteers, and 2,000 civil society groups were mobilised, and 9,000 shelters and 7,000 kitchens pressed into service, Patnaik said.
"Instead of it being a tragedy of humongous proportions, we are in the process of restoring critical infrastructure," he said.
Neighbouring West Bengal state escaped substantial damage, but authorities moved nearly 42,000 people to safer locations.
"Electricity has been restored in most places. In the next two days, the situation will be normal," West Bengal chief minister Mamata Banerjee said in a statement.
About 1.2 million people living in the most vulnerable districts in Bangladesh had also been moved to some 4,000 shelters. (Reporting Jatindra Dash in BHUBANESWAR and Ruma Paul in DHAKA; Additional reporting by Subrata Nag Choudhury in KOLKATA; Writing by Devjyot Ghoshal; Editing by Simon Cameron-Moore and Jan Harvey)
Our Standards: The Thomson Reuters Trust Principles.