The State Department said on Saturday it was forced to withdraw a diplomat from the U.S. embassy in Singapore but denied that Asian nation's charge the envoy meddled in internal affairs.

The first secretary in the U.S. mission in Singapore, E. Mason Hendrickson, was withdrawn with "deep regret" at Singapore's request even though he did nothing wrong, said Ben Justesen, a State Department spokesman.According to the Singapore Home Affairs Ministry, Hendrickson urged a group of lawyers to "contest the elections against the government and had involved himself in Singapore's domestic politics."

"It is perfectly legitimate for Hendrickson to keep in touch with leaders of the constitutional opposition... in order to analyze and understand Singapore politics," the ministry said.

But it said the diplomat had met with the lawyers "in order to attack the Singapore government and instigate them to stand for election against the government."

Justesen said Singapore asked the United States to withdraw Hendrickson, who left the country Saturday in keeping with established international law that gives a government the right "without having to explain its decision" to order a diplomat out.

"We do not accept the basis for the Singapore government's request that Mr. Hendrickson be withdrawn--that he acted in any way improperly," Justesen said.

He said the diplomat's activities "were entirely in keeping with normal diplomatic practice and his responsibilities" as a foreign service officer.

"In meeting with members of political opposition, which appears to be the basis of the Singapore government's protest, Mr. Hendrickson was doing what American diplomats are expected to do in any country, namely to be in touch with a broad spectrum of individuals in order to report accurately developments in the country."

Justesen said the United States rejected Singapore's additional request that two senior U.S. officials be reprimanded. The officials were not named.

The spokesman also said he could not provide biographical information about Hendrickson.

In the elections, to be held sometime before the end of next year, Prime Minister Lee Kuan Yew's People's Action Party is overwhelmingly favored to retain control.

The ministry statement said a lawyer, Patirck Seong, was arrested April 19 and disclosed that Henrickson had made appeals to him.

On Friday, the ministry said Francis Seow Tiang Siew, a prominent lawyer, had been arrested under the internal Security Act for questioning into possible foreign interference in Singapore's internal affairs.

Earlier in the week, the ministry said foreigners were behind a recent joint statement by dissident Singaporeans that they were ill-treated while in jail and forced to confess to subversion.

"Singapore considers the U.S. to be a good friend. It values the friendly and cordial ties it enjoys with the U.S. It wants to maintain and build upon that long-term relationship," the ministry said.

The Reagan administration has had good relations with Singapore, a prosperous former British colony in Southeast Asia.