WASHINGTON (AP) — The U.S. Congress has cleared and sent to President Barack Obama legislation directing him to levy sanctions against Venezuelan government officials involved in a crackdown on anti-government protesters.

The Senate passed a bill Monday evening and the House approved the measure by voice vote Wednesday evening.

It authorizes sanctions that would freeze the assets and ban visas of individuals accused of perpetrating acts of violence or violating the human rights of those opposing the South American country's socialist government. Earlier this year, the State Department imposed a travel ban on Venezuelan officials accused of abuses during a months-long street protest movement.

"The absence of justice and the denial of human rights in Venezuela must end, and the U.S. Congress is playing a powerful part in righting this wrong," said Sen. Robert Menendez, the Democratic chairman of the Senate Foreign Relations Committee and the author of the bipartisan Venezuela Defense of Human Rights and Civil Society Act. "When this bill becomes law, a spotlight will shine on Venezuela's abusers and target individuals responsible for human rights violations by applying asset-freezes and visa bans."

Last week, a leading opposition figure, Maria Corina Machado, learned that she was being charged with conspiracy in connection with an alleged plot to kill President Nicolas Maduro, a move she called an attempt to silence her and other critics of the government. Together with fellow opposition leader Leopoldo Lopez, Machado called tens of thousands of demonstrators into the streets to protest the government earlier this year. Lopez was arrested nine months ago for his role in the sometimes violent protests. He turned himself in during an emotional public event.

In a message broadcast on national television and radio after the Senate approval, Maduro said that if Obama wants to challenge Venezuela with sanctions, "things are going to turn out very badly for them."

Rep. Ileana Ros-Lehtinen, a Florida Republican, said the bipartisan legislation signals the U.S. will not tolerate impunity of violations of human rights in Venezuela.

"We support the calls of democracy and freedom by the people of Venezuela," she said. "I call on President Obama and the State Department to vigorously enforce the sanctions against Venezuelan officials swiftly."