HANOI—Vietnam and India agreed Monday to expand cooperation in oil and gas exploration and production in contested waters of the South China Sea, despite previous objections from China.

The agreement between ONGC Videsh Ltd. and Vietnam Oil and Gas Group, or PetroVietnam, was among several signed between the two countries in Hanoi Monday as part of a four-day visit to Vietnam by Indian President Pranab Mukherjee.

"ONGC...