For months, Gen. Pervez Musharraf, Pakistan's military ruler, has been telling anyone who would listen that he is willing to meet India's prime minister "any time, any place" to talk about resolving the conflict over Kashmir. Now India has called his bluff.

An invitation for talks, issued Wednesday by Prime Minister Atal Bihari Vajpayee, appears to hand the Pakistani army chief a degree of political legitimacy he had been denied since seizing power 19 months ago. But India's move also puts Musharraf in a difficult position: He must now demonstrate he can be a diplomatic and flexible leader, willing to compromise with his country's arch-adversary or risk proving his foreign critics right.

If the general appears too conciliatory, however, particularly on the Kashmir issue, he will risk arousing the wrath of powerful Islamic groups in Pakistan and jettisoning the sole cause that unites this fractious and volatile society.

"Musharraf is in a tight spot," said Arif Nizami, editor of the Nation newspaper in Lahore. "He knows there is no military solution to Kashmir, and he has kept on saying he wanted to talk. Now India is no longer painting him as an enfant terrible, but it is not clear whether he can sell Pakistanis on a deal with India. He has shunned the politicians, and the [hard-line Islamic] groups are arrayed against him. This brings his isolation into sharp focus."

India and Pakistan have been at loggerheads for 53 years over Kashmir, a mountainous region that is divided between the two countries and claimed by both. Since 1989, Muslim insurgents backed by Pakistan have been fighting Indian troops in the Indian portion of Kashmir, leaving tens of thousands dead.

In February 1999, Vajpayee broke the ice by traveling to the Pakistani border and signing an agreement with Nawaz Sharif, then Pakistan's prime minister. The two leaders pledged to work to resolve all bilateral issues, including nuclear tension, terrorism and the Kashmir dispute.

But three months later, the detente was shattered when Pakistani-backed fighters invaded the Kargil mountains in Kashmir, setting off a 10-week conflict with Indian troops. Musharraf, who was Pakistan's army chief at the time, overthrew Sharif's government that October, leading India to shun him as a traitor to peace and democracy.

The violence in Kashmir continued to escalate, even after Vajpayee called a unilateral cease-fire last November. Pakistan-based Islamic groups, bent on a holy war against Hindu India, sent hundreds of fighters into Kashmir.

Now that Vajpayee has called off the cease-fire, after extending it three times, and proposed talks, Musharraf must come face to face with the basic contradiction in Pakistan's Kashmir policy -- and choose between gaining credibility abroad or fending off adversaries at home.

"Musharraf will have the burden of history on him," said Rifaat Hussain, chairman of the strategic studies department at Quaid-i-Azam University. "It is a huge opportunity for the architect of Kargil to turn into the architect of peace, but if he is as flexible and bold as the occasion requires, it could get him in trouble with the hard-liners at home who want to sabotage the process."

Musharraf has not made any public statements since Vajpayee's offer, but aides said he is determined to approach India with sincerity and seriousness. They said senior military officials support his efforts and they played down the clout of militant groups and Islamic hard-liners in the military who oppose negotiations with India.

"Some people say the army needs Kashmir to perpetuate itself, but we are not mad," Maj. Gen. Rashid Qureshi, Musharraf's military spokesman, said in an interview. "The top officers have never been opposed to talking with India, and far too much credence is given to the influence of the [militants]. They can whip up hysteria, but they cannot win any elections."

Pakistan's suspicions of India are long and deeply held, beginning with what it viewed as India's illegal annexation of Kashmir after the partition of India and Pakistan in 1947 and India's refusal to honor U.N. resolutions calling for a Kashmiri plebiscite on self-determination.

This bitterness deepened in the early 1970s, when India militarily abetted the breakup of Pakistan and the creation of Bangladesh, then conducted its first nuclear tests in 1974. In 1998, India tested five more nuclear weapons, and Pakistan responded with its own tests. The Kargil conflict of 1999 intensified tensions, which have been high ever since.

PERVEZ MUSHARRAFATAL BIHARI VAJPAYEE