By JOSH LEDERMAN and MATTHEW PENNINGTON, Associated Press

WASHINGTON (AP) — The prime minister of Singapore joined President Barack Obama at the White House Tuesday to celebrate the 50th anniversary of U.S. diplomatic relations with the Southeast Asian city state. But the two leaders will also discuss a shared cause with less rosy prospects — the Trans-Pacific Partnership free trade deal.

Prime Minister Lee Hsien Loong was greeted by an elaborate welcome ceremony as his limousine pulled in to the South Lawn of the White House. Hundreds of U.S. military members in blue and white uniforms formed an honor guard, some carrying bayoneted rifles. A canon fired repeatedly as a military band played the two countries' national anthems.

NEWS OF THE DAY: Trump Calls Hillary Clinton 'The Devil' ]

Obama and Lee were to meet in the Oval Office. Lee will also be honored with a state dinner on Tuesday evening.

Singapore, a close U.S. partner, is one of the 12 nations in the TPP, an agreement key to Obama's effort to boost U.S. exports and build strategic ties in Asia. But Lee's Washington visit comes as opposition to the TPP intensifies in the United States. Both Republican contender Donald Trump and his Democratic rival Hillary Clinton, who are competing to succeed Obama as president, oppose it.

Speaking at the U.S. Chamber of Commerce late Monday, Lee urged its ratification, saying the pact would give the U.S. better access to the markets that account for 40 percent of global economic output. He said it would also add heft to Washington's so-called "rebalance" policy for the Asia-Pacific region.

"For America's friends and partners, ratifying the TPP is a litmus test of your credibility and seriousness of purpose," he said.

His sentiments are shared by Obama, who told Singapore's The Straits Times in an interview published Monday that the U.S. can't "turn inward" and embrace protectionism because of economic anxieties that have been drawn out by the presidential election.

The Obama administration says it remains determined to try and win congressional approval for TPP, but the chances of achieving that in the "lame duck" session after the Nov. 8 election and before the new president takes office Jan. 20 appear slim because of the depth of political opposition, not least from Obama's fellow Democrats.

The deal would eliminate trade barriers and tariffs, streamline standards and encourage investment between the 12 countries that include Mexico, Japan, Vietnam and Australia. But critics say the pact undercuts American workers by introducing lower-wage competition and gives huge corporations too much leeway.

Singapore, a city state of 5.7 million people, is heavily dependent on international trade for its prosperity. In 2004, it became the first Asian nation to strike a bilateral free trade agreement with the U.S. Last year, the bilateral trade in goods totaled $47 billion, with the U.S. enjoying a $10 billion surplus.

Singapore is also a strong advocate of the U.S. security role in Asia although it retains cordial ties with China too. Under Obama, the U.S. has deployed littoral combat ships in Singapore, and last December, deployed a P-8 Poseidon spy plane there for the first time, amid heightened tensions in the South China Sea.

Lee's meeting with Obama on Tuesday will be watched for reaction to an international tribunal ruling July 12 that invalidated China's historical claims to most of the disputed South China Sea. The U.S. says the ruling is binding but China has rejected it. Southeast Asian nations have been reluctant to speak out against Beijing.

Lee will be honored with a state dinner Tuesday evening — the first held for a Singaporean leader since October 1985, when Ronald Reagan hosted Lee's father, Prime Minister Lee Kuan Yew.

The U.S. and Singapore opened diplomatic relations in 1966, a year after the U.S. recognized Singapore's independence from Malaysia.