DEAUVILLE (Reuters) - The United States will support Japan as it rebuilds from a devastating earthquake in March and is confident Japan will emerge from the crisis stronger than ever, President Barack Obama said on Thursday. Obama, who met with Japanese Prime Minister Naoto Kan on the sidelines of the Group of Eight summit in France, said the United States would support its ally as it rebuilt. "The United States will stand by Japan for as long as it takes for Japan to recover," Obama said. Obama said the two countries will continue working together on Afghanistan, Pakistan and security in East Asia, citing North Korea and the "long-term security structure" in the region. He said they were also working to expand trade opportunities. He praised Kan, whom he was seeing for the first time since the quake, for his "leadership at a time of great crisis for his country". Kan thanked Obama for the US support, including the naval relief efforts, and said the backup would help Japan recover. "The Japanese people are deeply grateful for what the United States has done," he said. Kan is due to make an official visit to the United States in September, a US official said. On trade, Kan said he would take up certain trade proposals soon, citing the US-led Trans-Pacific Partnership, which he said he had wanted to get to by June if it had not been for the earthquake. Kan said Japan will continue efforts in Afghanistan and Pakistan, and "work with the United States on this issue."