On Monday, thousands of protesters greeted President Obama as he held talks with his counterpart Benigno "Noynoy" Aquino III at the presidential palace in Manila. The demonstrators even burned an effigy of the American commander-in-chief. But that did nothing to thwart the inking of a landmark security deal between the two countries.

The new 10-year defense agreement is perhaps the most significant achievement of Obama's four-country tour of Asia, where the Philippines was the final destination. U.S. troops now have expanded access to Philippine facilities and will participate in an increased number of joint military exercises with the archipelago nation. There's no plan at present for a permanent American troop presence nor a clear indication that the U.S. would come to the Philippines' defense in the face of an external threat. But the pact represents something an about-face for Manila: more than two decades ago, the last U.S. naval base in the country at Subic Bay -- a legacy of nearly half a century of American colonial rule -- was shut down. (At the time, Aquino's mother, Corazon, was the country's President.)

The protesters demonstrating against Obama were angered by what they saw as the meddling return of a former imperial power. But a much larger group of Filipinos is more concerned with newer Asian realities. The Philippines has increasingly sparred with China over disputed islands in the South China Sea, a body of water that China claims almost in its entirety, despite the rival claims of a number of Southeast nations. As detailed here, China's emergence as a budding superpower has occurred parallel to a massive expansion of its naval capabilities, which has other countries in the region nervous. In the last two years, Chinese and Philippine vessels have engaged in tense standoffs over a set of shoals (see map below) just miles away from the Philippine coast.

This March, Chinese coast guard ships blocked Philippine civilian vessels from resupplying marines stationed at the Second Thomas shoal, among the countless spits of rock and reef that comprise the contested archipelagos of the South China Sea. In 2012, after the Philippine navy intercepted Chinese fishing vessels poaching protected species by the Scarborough shoal, Chinese maritime ships arrived to prevent the fishermen's arrest--an incident that almost escalated into conflict.

The spats have inflamed Philippine public opinion. According to Pew, only 48 percent of Filipinos now have a favorable view of China--compared to 85 percent for the U.S. For all the ire American foreign policy attracts elsewhere in the world, there are still countries--including many in East Asia--where the involvement of the U.S. is recognized as a guarantor of stability. The Philippines, in particular, is a nation well-disposed to the U.S., with so much of its politics and society shaped by the decades of American occupation following the Spanish-American War.

Manila's alliance with Washington has strengthened under Aquino. When I met him before his election victory in 2010, he spoke generously of China's role in the region and the Philippines' desire to have strong ties with all major players in the Pacific. But, in the intervening years, Aquino's stance perceptibly hardened and he has become perhaps the most forthright statesman in Southeast Asia when it comes to confronting perceived Chinese aggression.

Obama, meanwhile, reiterated that the new defense deal with the Philippines was not about containing China. But it's hard not to view it in the context of a larger geopolitical chess match in the Pacific. The U.S. now has greater operational flexibility when contemplating maneuvers and actions in the South China Sea. The protesters in Manila may remain apoplectic about Uncle Sam's footprint, but strategists in Beijing will have cause for pause, as well.