U.S. President Barack Obama pressed his Chinese counterpart Xi Jinping on Saturday on territorial disputes in the South China Sea, urging Beijing to uphold its legal obligations and stressing the United States' commitments to its regional allies.

Xi said China would continue to safeguard its sovereignty and maritime rights in the South China Sea, according to a statement on the Chinese Foreign Ministry's website.

The two leaders and their delegations met for over four hours before Obama and Xi talked one-on-one as they took a nighttime stroll.