DHAKA (AFP) - Former US presidential candidate John McCain on Wednesday called on all Bangladeshi politicians to accept the outcome of elections that will end two years of rule by an army-backed government. Speaking during a visit to Dhaka ahead of the December 29 polls, McCain praised the interim authorities and the army "for strengthening the foundations of Bangladesh's democracy." "Their work is not yet done and it is now the time for an elected successor to continue the reform process already begun and to build democracy and enhance prosperity for Bangladeshi people," he said. "It will be equally important for all to accept the results of the elections and work together in the interest of the country." Bangladesh has been ruled by an interim government since January 2007 when, after months of political violence between supporters of the ruling BNP and the opposition Awami League, the army imposed an emergency and cancelled polls. Over the past two years the government has pushed through electoral and political reforms, including a crackdown on corruption. McCain also urged Bangladesh to play a role in combating terrorism in South Asia following last week's attacks in the Indian city of Mumbai that killed 188 people. "We talked to officials of your government about the need for co-ordinated action to fight terrorism in the region," he said, adding that he expected full co-operation from Pakistan as India investigated the attack. McCain, who is travelling with fellow senators Joe Lieberman and Lindsey Graham, will visit Pakistan later this week. He said he hoped to return to Bangladesh with his wife and teenage adopted daughter, Bridget, who was born in the country.