CARACAS, Venezuela — President Obama plans to sign into law a bill that would impose sanctions on Venezuelan government officials responsible for human rights violations or violence against protesters who took part in antigovernment demonstrations here this year, a White House spokesman said in Washington on Thursday.

Venezuela is a major oil supplier to the United States, but the two countries have had rocky relations during the governments of two leftist presidents, Nicolás Maduro and his predecessor and mentor, Hugo Chávez, who died last year.

Mr. Maduro has condemned the proposed sanctions and hinted at possible reprisals.

“The gringos now say that they are going to impose sanctions on Venezuela,” he said on Wednesday. “No one imposes sanctions on Venezuela, because our people decided to be free.”

The bill, which passed the Senate and the House this week, directs the president to impose sanctions on Venezuelan officials and others who were involved in human rights violations aimed at protesters or who ordered the arrest or prosecution of someone for exercising freedom of expression or assembly.