These days, the battle for the Indian Ocean seems to be all about the dread pirates of Somalia. On Wednesday, the U.S. briefly became a direct player in the ongoing drama, with news that those pirates had hijacked a U.S.-flagged cargo ship, the Maersk Alabama, and taken 20 American citizens prisoner. But the crew regained control of the ship, except for the captain, who remains on a lifeboat in the hands of the pirates. (See pictures of the brazen pirates of Somalia.)

But a drama with more far-reaching geopolitical consequences may be brewing in the Indian Ocean, involving two of the nations that have sent warships to fight the Somali buccaneers: longtime rivals India and China. New Delhi has had at least one ship in the Gulf of Aden since October, and late last year, with great fanfare, China deployed two warships to the same area. The ships have been active in interdicting pirates and coming to the aid of commercial ships in apparent distress  though they are not part of the U.S.-led Combined Task Force 151 (usually composed of 14 to 15 vessels from several nations), which coordinates its activity with the dominant naval force in the Indian Ocean, the U.S. 5th Fleet, based in Bahrain. But the presence of the Chinese and Indian warships underlines Beijing's and New Delhi's intense economic and strategic interests in the world's third largest ocean. (See the top 10 audacious acts of piracy.)

Both countries are hugely dependent on the petroleum deliveries that course through the Gulf of Aden and Strait of Hormuz to their ports. Defending those supplies is one reason both are building bigger and bigger navies. China's navy, with more than 300 ships, may in fact soon surpass the U.S.'s as the world's largest. Beijing is certainly sparing little to stock its ships with armaments. India, in the meantime, is acquiring several nuclear-powered submarines to augment its 155 military vessels in the ocean that bears its name.

Already, New Delhi and Beijing seem to be focusing their naval strategies on each other. China is constructing naval stations and refueling ports around India, including in Burma, Sri Lanka and India's nemesis Pakistan; India has transformed a beautiful bay in the southern state of Karnataka into an advanced naval installation. Chinese strategic planners look jealously on the fact that India has an aircraft carrier (the recommissioned H.M.S. Hermes, purchased from the British Royal Navy and now called the I.N.S. Viraat).

The potential for confrontation is fueled by China's historical nostalgia. In the 15th century, the Chinese sent seven massive naval and commercial expeditions into the Indian Ocean to extend the prestige and power of the relatively new Ming dynasty. There had not been anything quite like it in history, and the Chinese were recognized as the masters of the ocean. But a change in emperors and national policy curtailed the expensive naval forays after 1433, and China turned inward. As if to declare that centuries-long period over, Beijing staged elaborate celebrations in 2005 to mark the 600-year anniversary of the first expedition. The Ming voyages are now an inextricable part of Chinese nationalist lore  and its populist claim to the Indian Ocean.

Overheated daydreams about history can be dangerous. Nevertheless, at least one analyst believes that while there is potential for conflict, there is also the possibility of a new order for the Indian Ocean  with a central role for the U.S. In the March-April edition of Foreign Affairs, Robert Kaplan envisions the U.S. as managing the rival ambitions of India and China into a workable security continuum, even as Washington's ability to project naval power recedes. There are enough interlocking economic interests, he says, to keep tempers and national interests from roiling the waters. America, Kaplan concludes, "will serve as a stabilizing power in this newly complex area. Indispensability, rather than dominance, must be its goal." (Read about a remote U.S. base in the Indian Ocean.)

That is, after all the powers figure out what to do about those pesky pirates.