CARACAS, Venezuela — The government of President Nicolás Maduro won a seat Thursday on the U.N. Human Rights Council, a controversial victory for a regime accused of using intimidation, torture and murder to cling to power.

The Maduro government, no longer recognized as legitimate by the United States and around 50 other countries, had sought a return to the 47-member panel to counter an image of international isolation — and thwart investigations into its own alleged abuses.

Venezuela and regional rival Brazil beat out Costa Rica for the two Latin American seats up for election. Costa Rica had declared its candidacy only this month in an effort to deny Venezuela a three-year term, but the support of China, Russia, Cuba and other allies gave the socialist state the win.

“We celebrate, once again, the Bolivarian diplomacy of peace at the U.N.,” Venezuelan Foreign Minister Jorge Arreaza said after the vote. “This victory is historic, since we faced a ferocious campaign.”

While the government celebrated Thursday, opposition leader Juan Guaidó accused it of killing a member of his party. Edmundo Rada, a 42-year-old former councilman from the eastern Caracas slum of Petare, was found shot twice in the neck, a bag covering his face and half his body burned.

“On the same day that the U.N. permits a dictatorship like Maduro’s to occupy a seat bathed in blood,” Guaidó said, “the regime produces a human rights violation.”

Guaidó called for an “impartial international commission” to investigate this and other killings. Venezuela’s Communications Ministry did not immediately respond to a request for comment.

Julio Borges, the foreign relations representative for opposition leader Juan Guaidó, said Maduro “mortgaged everything” to win the seat.

“But what he doesn’t know is that this maneuvering won’t let him hide his crimes,” Borges said. “Elected democracies in this body will increasingly isolate the dictatorship and will expose its human rights violations.”

The General Assembly elected 14 members to new terms Thursday. Countries can serve up to two consecutive terms before withdrawing for at least a year.

Human rights watchdogs had urged U.N. members to reject the Venezuelan bid.

“With the seat, Venezuela will try to undermine scrutiny of its abuses and the abuses of its allies,” said Louis Charbonneau, U.N. director at Human Rights Watch. “The council’s fact-finding missions and commissions of inquiry have done outstanding work. The votes on some issues can be close, so we don’t need countries like Venezuela who try to undermine the good work.”

The council promotes human rights and investigates alleged violations. It’s distinct from but works closely with the U.N. high commissioner for human rights.

High Commissioner Michelle Bachelet has painted a bleak picture of Maduro’s Venezuela. In three reports this year, she documented arbitrary detentions, torture and killings. In July, she said corruption and underinvestment had violated Venezuelans’ right to an adequate standard of living.

Maduro, who succeeded the late socialist leader Hugo Chávez in 2013, claimed victory last year in elections widely viewed as fraudulent. The United States and other nations recognize Guaidó as Venezuela’s rightful president, but Maduro remains in control of the military, police and intelligence services, and talks between the sides have ended in a stalemate.

Secretary of State Mike Pompeo called Venezuela’s election to the council “truly tragic.”

“This is a harsh blow not just against the victims of the Venezuelan regime, but also against the cause of human rights around the world,” he said. “The Human Rights Council ought to be a protector and defender of human rights of people the world over. It should be speaking out about the daily abuses of the former Maduro regime.”

Venezuelan Attorney General Tarek William Saab announced the release of 24 political prisoners Thursday as part of an agreement with minority opposition parties with whom the government has continued to talk. The legal nonprofit Foro Penal has counted nearly 450 political prisoners in the country.

Mariano de Alba, a Venezuelan lawyer based in Washington, predicted Maduro would use the win to show his government “still has support and is recognized by a majority of the world.”

“It’s a shame,” he said. “But in practice, it’s not the end of the world for the opposition.”

The Human Rights Council has a long history of members with problematic records. China, Cuba and Saudi Arabia are current members, Libya and Sudan also won seats Thursday, and Venezuela served as recently as last year.

The United States quit the panel last year over what the Trump administration said was its bias against Israel. President Trump said it was a “massive source of embarrassment.” Pompeo called it an “exercise in shameless hypocrisy,” with “some of the world’s most serious offenders sitting in it.”

In July, Cuba led an effort to pass a resolution rejecting “unilateral and coercive” sanctions against Venezuela. It succeeded.