ISLAMABAD, Pakistan (AP) _ Pakistan on Thursday gave two Indian diplomats 24 hours to leave the country in retaliation for India's expulsion of Pakistani officials accused of spying, the official news agency said.

India's ambassador was told ''Pakistan held the Indian government responsible for the reprehensible manner in which the two officials of the Pakistan Embassy were treated and demanded that an immediate enquiry be held and the culprits punished,'' according to the Associated Press of Pakistan.

B.D. Sharma, India's consular-general in the southern port city of Karachi, and an employee at the embassy in Islamabad have been ordered out of the country without charge or explanation.

The order came on the heels of a nationally televised presidential address naming Benazir Bhutto prime minister. Bhutto's Pakistan People's Party won the largest bloc of votes in Nov. 16 general elections after a campaign promising to uplift the poor.

A foreign ministry spokesman said it was regrettable ''such an incident should have been contrived on the eve of the induction of a new government in Pakistan when it was hoped that fresh attempts would be made to normalize relations between India and Pakistan,'' according to the official agency.

The announcement came after India said it arrested Pakistan's military attache, Brig. Z.I. Abbasi, and senior embassy clerk Mohammad Ashraf Khatib on Wednesday night while they allegedly were accepting a highly sensitive Indian defense document. The two returned home Thursday.

Indian officials have refused to disclose the nature of the document. But they claim the pair paid $3,500 to an Indian who handed it to them in a New Delhi hotel. All three were arrested but the Pakistanis were released because of their diplomatic status.

Press Trust of India identified the Indian as local lawyer Subhash Chandra Dutt. It said he appeared before a city magistrate Thursday and was ordered held in police custody until Dec. 14 pending investigation. People can be held legally in India for 90 days without charge.

Hindu-dominated India and Pakistan, a majority Moslem state, have fought three wars since gaining independence from Britain in 1947. They have massed tens of thousands of troops along their 970-mile border.