The former US ambassador to Vietnam has said he resigned last year in opposition to a Trump administration plan to deport more than 8,000 Vietnamese people, most of whom are refugees.

Ted Osius, who worked in the US foreign services for 30 years, said the Trump administration asked him to press Vietnam’s government to accept the deportees – who had mostly fled the country after the fall of Saigon in 1975.

“The majority targeted for deportation – sometimes for minor infractions – were war refugees who had sided with the United States, whose loyalty was to the flag of a nation that no longer exists,” Osius wrote in an essay for the Foreign Service Journal this month.

“And they were to be ‘returned’ decades later to a nation ruled by a communist regime with which they had never reconciled. I feared many would become human rights cases, and our government would be culpable.”

Osius said the deportations would undermine the Trump administration’s other goals for relations with Vietnam, which included responding to the threat posed by North Korea. “I voiced my objections, was instructed to remain silent, and decided there was an ethical line that I could not cross if I wished to retain my integrity,” he wrote.

A state department spokesperson said a top priority of the US government was deporting people with final orders of removal.

“The US government requires the cooperation of foreign governments to facilitate the return of their nationals who have been ordered removed from the United States after exhausting their rights to legal process,” the spokesperson said.

Up to 2 million refugees fled Vietnam following the war. Osius said many of those targeted by the Trump administration were tied to the US-supported state of South Vietnam, which has since collapsed.

In 2008, the US and Vietnamese governments agreed that Vietnamese immigrants who arrived in the US before 1995 would not be subject to deportation.

Vietnam is, however, one of nine countries the US considers “recalcitrant” because it does not cooperate with US immigration removal orders, according to Immigration and Customs Enforcement (Ice).

Osius was dispatched to Vietnam in 2014 after working in India and Indonesia. He is now vice-president of Fulbright University Vietnam, a private, nonprofit institution in Saigon.

In his essay, he referenced low morale in the US state department, but said he had also considered leaving the department under a past administration when he opposed the country’s approach toward North Korea.

“The challenges to the foreign service, and to our democracy, are existential. Some who remain at state feel besieged and demoralized,” Ossius said. “Yet I urge those foreign service officers who believe in making a difference to remain, if possible, because it is still a privilege to serve our country.”