A BILL approved by a Senate committee in the United States that will bar Philippine officials involved in the detention of Senator Leila M. De Lima from entering the US is illegal, a senator said.

The proposal fits the meaning of a Bill of Attainder — a legislative act declaring a person guilty of some crime and punishing him, often without a trial — which is prohibited by both the US and Philippine Constitutions, Senate President Vicente C. Sotto III told reporters at the weekend.

“Maybe the legal staff of the two senators should study their Constitution,” Mr. Sotto said, referring to the American senators who made the proposal.

In a social media post, Mr. Sotto noted that under the US Constitution, “no Bill of Attainder or ex post facto law will be passed.”

The 1987 Constitution also says that “No ex post facto law or bill of attainder shall be enacted.”

US Senator Dick Durbin in a Sept. 27 social media post said his proposed amendment with Senator Patrick Leahy to prohibit the entry of Philippine officials behind the “politically motivated imprisonment” of Sen. de Lima had been approved.

The two lawmakers were among the senators who sponsored a resolution calling for Ms. de Lima’s immediate release.

University of the Philippines College of Law professor Jay L. Batongbacal said the US Senate’s move was not a violation of the provision on the Bill of Attainder. “The Bill of Attainder legislatively imposes criminal penalty for offenses without trial,” Mr. Batongbacal said in response to Mr. Sotto’s social media post.

He said the proposed US ban was a form of immigration control, similar to the ban imposed by the Philippines on United Nations representatives seeking to investigate the government’s anti-illegal drug campaign.

Meanwhile, Justice Secretary Menardo I. Guevarra said the two US senators would have to deal with a potential backlash from their own country and abroad.

The justice chief said the views of two US senators do not reflect the sentiment of the entire US Congress.

Senator Christopher T. Go said he would propose to President Rodrigo R. Duterte to ban the US senators from entering the Philippines.

Ms. de Lima, a staunch critic of President Rodrigo R. Duterte’s war on drugs, has been detained since February 2017 after her indictment for allegedly conspiring to commit illegal drug trading inside the national penitentiary when she was the justice secretary. — Charmaine A. Tadalan and Vann Marlo M. Villegas