BEIJING - For the United States, maintaining good relations with both India and Pakistan has often been an impossible task. The hatred between South Asia's archrivals is so great that attempts to befriend one usually antagonized the other.
Now, the war in Afghanistan has created a rare opportunity to break that cycle.
The United States, Pakistan and India have found themselves on unfamiliar ground: the same side. And Washington probably has better simultaneous relations with the two nations than at any other time since their founding as independent states more than a half-century ago.
This unexpected byproduct of the Sept. 11 attacks has given the United States a chance to pursue more independent relationships with India and Pakistan, analysts say. Washington may also use the changed political landscape to encourage the two nuclear-armed enemies to begin to try to resolve their long-standing differences.
"We have hit the reset button of U.S. foreign policy as it relates to India and Pakistan," said Karl F. Inderfurth, a faculty member in the Elliott School of International Affairs at George Washington University and a South Asia specialist in the Clinton administration. "We have a clean slate to work with."
Analysts from Washington to New Delhi acknowledge that turning opportunity into reality will be difficult. Given the bitterness and sensitivities of the two countries, U.S. diplomats will have to operate with extreme care and subtlety. Any progress will require considerable compromise and political courage on all sides.
"The divisions are very historical and run very deep," said Subhash Kapila, a researcher with the South Asia Analysis Group, a New Delhi-based think tank. "This makes even the most dispassionate analysts distrustful."
Pakistan and India have been at odds since they parted ways in 1947. India, a majority Hindu nation of 1 billion people, is about one-third the size of the United States. Pakistan, a little less than twice the size of California, is an almost exclusively Muslim nation of 141 million. Although both countries are poor, India has a far larger economy - the world's 15th biggest.
At the heart of the nations' mutual hatred lies the majestic mountain region of Kashmir. If India's and Pakistan's partition constituted a bitter divorce, Kashmir is the child they continue to fight over.
At the time of India's independence from Britain, Muslims created their own homeland - the Islamic Republic of Pakistan. Pakistani leaders expected Kashmir, a mostly Muslim state divided between Pakistan and India, to join them. Under pressure from Indian leaders, Kashmir's Hindu ruler chose India. Two wars followed.
"We feel India cheated us," said Pervaiz Iqbal Cheema, president of the Islamabad Policy Research Institute.
Rebellion against rule in the Indian-held portion of Kashmir broke out in 1990. Since then, Pakistan has helped send thousands of Islamic militants - most of them trained in Pakistani and Afghan camps - to fight there. Indian soldiers have used summary torture, rape and execution against Muslims suspected of supporting militants, according to human rights groups.
The conflict has cost tens of thousands of lives.
In recent years, the United States had shifted away from Pakistan, its old Cold War ally, and begun to court India. The pattern in relations among the three countries was evident last year when Bill Clinton made the first presidential visit to South Asia in more than 20 years.
Clinton spent five days in India, where he danced with village women, charmed Indian politicians and pledged friendship with the world's largest democracy. He spent about five hours in Pakistan, where he scolded the government for supporting Muslim militants in Kashmir and did not pose for photos with the country's military ruler, Gen. Pervez Musharraf.
After the Sept. 11 attacks, Washington and Islamabad abruptly renewed their old alliance, sending tremors through India's foreign policy establishment. Musharraf reversed seven years of support for the Taliban and joined the global effort against terrorism. The change came at the request of the United States, which needed Pakistani help to attack the Taliban and find Osama bin Laden.
In dropping the Taliban, Musharraf traded a politically costly relationship with militant Islamic fundamentalists for better ties with the United States. The decision has served the interests of Washington, New Delhi and Islamabad:
The United States received permission from Pakistan to use its airspace to strike targets in Afghanistan. India, which is fighting Pakistani-backed militants in Kashmir, was gratified to see U.S. warplanes pound militants in Afghanistan. And Musharraf saw his international prestige soar amid promises of Western aid for Pakistan's failing economy.