TOKYO — President Obama pledged nearly unreserved support for Japan Thursday in its tense territorial dispute with China, and offered breathing room in tough trade negotiations, as well, signaling a deepening commitment to Japan and a potentially warming relationship with its right-leaning prime minister, Shinzo Abe.

"Our treaty commitment to Japan's security is absolute," Obama said after a summit meeting with Abe. "Article 5 (of the U.S.-Japan Security Treaty) covers all territories under Japan's administration, including the Senkaku Islands."

Japan has been pressing for a clear statement of U.S. support in its dispute over the remote Senkakus, which China claims as Diaoyu. Officials had worried that the Obama administration, war weary and planning big cuts in defense, was no longer committed to its "pivot" to Asia.

Obama also agreed Thursday to extend talks over a wide-ranging trade pact, which stalled over Japanese tariffs on cars and agricultural imports.

Perhaps most surprising, however, is an apparently warming relationship between the two leaders.

Obama and Abe shared sake and sushi at an exclusive, 10-seat restaurant in the tony Ginza district shortly after Obama arrived Wednesday night. At Thursday's summit, they repeatedly called each other by first name and their body language and apparent ease at their joint press conference indicated a level of comfort that might have been missing in earlier meetings.

The friendliness seemed all the more surprising given recent controversy over Abe's rightist sentiments. The Obama administration publicly rebuked Abe in December for visiting the controversial Yasukuni Shrine, which glorifies and sanitizes Japan's militarist past. Senior Abe appointees have recently denied Japan's wartime misdeeds and accused the United States of committing war crimes against Japan.

Michael Cucek, a Tokyo-based research associate for the MIT Center for International Studies, said both sides may have agreed to settle their differences privately.

"Whatever criticisms about revisionist positions that Obama or his team may have about Abe, they are clearly for behind closed doors and not for public discussion," Cucek said.

The outward friendliness, genuine or otherwise, is likely intended as a signal to China of U.S.-Japan solidarity, said Brad Glosserman, executive director of the Pacific Forum CSIS, in Honolulu.

"The optics are good, and that is key. They've been informal, getting along, aligned on the issues. It's good image management," Glosserman said.

Japan is Obama's first stop in a four-nation tour in which he hopes to convince allies, and others, that the U.S. "pivot" to Asia is more than just rhetoric. He was scheduled to visit the region last year, but canceled due to the U.S. government shutdown.

Obama was forced to add South Korea to his itinerary because of Seoul's unhappiness with Tokyo over the issue of wartime "comfort women."

Obama began his day only full day in Japan with a call on Emperor Akihito at the Imperial Palace, a green oasis of calm amid the bustle of crowded Tokyo. The Akasaka Palace, a Neo-Baroque structure vaguely reminiscent of the Versailles in Paris, was built in 1909 for members of Japan's imperial family. It was designated an official government guest house in the 1970s.

Obama's visit – at barely 36 hours, short for state-visit standards -- is taking place amid unprecedented security. More than 16,000 police have sealed off roads and public spaces around the Imperial Palace, government offices and other locations around Tokyo.