The United States and Vietnam had reached agreement on all but the details of establishing normal relations last September, a senior State Department official said yesterday.

All the bilateral obstacles had been removed. We just had to work out the details," Deputy Assistant Secretary of State Robert Oakley told reporters.

Before that could happen, Vietnam began expelling its ethnic Chinese population and started preparing to invade Cambodia, he said. As a result, the United States shelved normalization plans.

Answering questions, Oakley also disclosed that new U.S.-Vietnamese talks began in June on the issues in dispute. He insisted that these talks had nothing to do with normalization.

Oakley flatly denied allegations by Vietnamese Acting Foreign Minister Nguyen Co Thach that the Carter administration shelved normalization because it placed higher priority on establishing ties with China.

His disclosures, however, tended to support many of the assertions Thach made to reporters in Hanoi earlier this seek and to soften hard denials issued then by the State Department.

Oakley's boss, Assistant Secretary of State Richard C. Holbrooke, said in a statement earlier this week that there had been "contacts" with Vietnam, but added "it is not true that renewed movement toward normalization of relations is under way."

Oakley yesterday said three or four meetings had been held with midlevel Vietnamese officials since June to discuss what he later described as the obsta cles to normalization - the refugee issue, Vietnam's military presence in Cambodia and its relations with its other neighbors.

Asked if the Vietnamese were justified in concluding that such talks concerned normalization, Oakley replied: "They are free to conclude what they want to."

A timetable that he gave of the failed negotiations with Vietnam last fall also tended to heighten the questions of some State Department officials, speaking privately, of whether talks in October on normalizing ties with China were a major factor in shelving talks with Vietnam.

Although the nearly completed agreement to establish ties with Hanoi had been reached by late September, it was not until around Nov. 1 that the administration told Hanoi it would not go ahead with normalization because of the situation with Cambodia, refugees and an economic agreement the Vietnamese formally signed with the Soviet Union the first week in November.

"When we say which way they were moving," Oakley said of the Vietnamese, the United States did not "rush to normalize and sort of put our were getting ready to do."

Several officials said they would not disagree with the widely circulated account that National Security Adviser Zbigniew Brzezinski urged the slow-down to avoid concern in Peking about U.S. rapprochement with a major rival in Asia.

Any public confirmation of this point seems unlikely, as it would confirm Vietnam's contention that the United States reneged on its pledges and later found excuses for not going ahead with normalization, diplomatic sources said.

Oakley said that more regular dialogue with Vietnam was begun in June to discuss the issues in dispute between the two countries and trips to the Far East that month by President Carter and Secretary of State Cyrus R. Vance.

Pressed by reporters to explain the difference between normalization talks and talks about removing major new obstacles to normalization: Oakley told reporters: "Talks, yes. Talks on normalization, no."

Oakley said, however, that the U.S. objective remained to normalize relations with Vietnam.

Two American consular officials are to leave for Bangkok this weekend to await final clearance for travel to Vietnam, where they will process emigrants to the United States.