President Ziaur Rahman of Bangladesh, a charismatic soldier turned politician who led his impoverished country from military to civilian rule, was assasinated early today in an coup attempt apparently led by an Army officer.

The vice president and chief justice, Abdus Sattar, took command of the government as acting president. He immediately proclaimed an "internal emergency" and suspended most civil rights, citing a threat to the country's security from "internal disturbances."

There were conflicting reports whether the reb ellion was spreading, with the national radio claiming it was confined to "troubles" in one city but other accounts reaching India telling of clashes in the capital and other areas. The United States, India and other countries issued statements deploring Zia's death and expressing hope it would not endanger the country's democratic institutions.

[In a radio broadcast from Chittagong early Sunday, the rebels said that a seven-member Revolutionary Council they established would provide "a clean and uncorruptible administration." Reuter reported from New Delhi.]

Zia's assassination after nearly six years in office halted one of the longest periods of relative political stability Bangladesh has known since it won independence from Pakistan in December 1971 in a bloody war of secession. The coup attempt again cast a pall of uncertainty over the desperately poor nation's efforts to produce more food for its 90 million inhabitants who are squeezed into an area slightly smaller than Florida.

The government radio in the capital of Dacca first announced that Zia was killed by "miscreants" in the port city of Chittagong, Bangladesh's second-largest city on the Bay of Bengal. later, it identified the assailants as a rebel group led by Maj. Gen. M. Manzur, commander of Bangladesh's 24th Division based in Chittagong.

Manzur announced over the Chittagong radio that he had formed the Revolutionary Council to run the countrty. He swiftly declared a rupture in relations with neighboring India, reflecting tension between the two countries over a number of issues including rights to water from the Ganges River, but listed no specific reasons for attempting to seize power.

The Army chief of staff, Lt. Gen. H. M. Arshad, called on manzur and his council to surrender and said the rest of the armed forces remain loyal to the government under Sattar. Judging from repeated broadcasts by the "new revolutionary government" over the local radio, Manzur controlled at least part of Chittagong but there was no word on the strength of his forces.

Unconfirmed reports said Zia, 45, died in heavy firing and that two of his aides and six bodyguards were also killed in an attack about 4:30 a.m. on a government rest house in Chittagong where Zia had been spending the night. [Travelers reaching India from Chittagong said the initial gunfire lasted about two hours, The Associated Press reported.]

The Dacca government called on loyal troops to leave Chittagong for nearby military camps and warned that the rebellious troops will be tried for treason if they do not surrender immediately. The insurgent broadcasts, however, claimed a Navy unit based in Chittagong joined the insurrection and said Manzur fired Arshad and a number of other loyal Army generals.

Dacca, the capital about 150 miles to the northwest, was reported quiet under indefinite curfew, according to the official radio, which also said there were no reports of violence from elsewhere in Bangladesh.

[But the Press Trust of India, an Indian news agency, quoted reliable reports reaching the Indian border town of Agartala as saying that the rebellion spread to several Army barracks, including some in Dacca and in the western Bangladesh town of Jessore, Reuter reported. The news agency also said the rebels control Chittagong's seaport and airport as well as a section of the Dacca-Chittagong road, adding that sporadic clashes continued into the night between rebels and loyal troops.]

The reported calm outside Chittagong, if accurately portrayed by the official radio, would indicate Manzur drew little immediate support among the people or the armed forces. If the reports of clashes elsewhere are true, however, they raise the specter of broader fighting between rival units.

Sattar claimed over the official radio that the government was functioning normally and that it honors all its international agreements, including a 1972 friendship treaty with India.

"I appeal to the entire people of Bangladesh to maintain peace and discipline with patience and solidarity at this hour of national calamity," he said in a national radio broadcast.

Sattar proclaimed 40 days of national mourning for Zia, but made no mention of funeral services or the whereabouts of his body. This strengthened the impression among monitors of the rival radio broadcasts that Manzur controlled part of Chittagong.

Only 10 days ago, a Bangladesh military court convicted two senior Army officers and a civilian for attempting to stage a coup against the Zia government last June. There was no apparent connection between today's insurrection and the earlier attempt.

Zia's assassination also followed by less than two weeks the return to Bangladesh of Hasina Wazed, daughter of the country's assassinated first president, Sheik Mujibur Rahman.

Wazed, who has been living in India for the last six years, was elected in absentia last February as chairman of the chief opposition party, the Awami League, as a compromise candidate by feuding factions of her father's old party.

She has charged that the Zia government rewarded her father's killers with choice diplomatic posts overseas and vowed to see them put on trial. There was no indication of any connection between Wazed or her Awami League and the Zia assassination.