BOGOTA—The U.S. is pursuing a long-shot bid to push Venezuelan President Nicolás Maduro to give up power in exchange for amnesty as overwhelming evidence emerges that the strongman lost last month’s election, people familiar with the matter said.

The U.S. has discussed pardons for Maduro and top lieutenants of his who face Justice Department indictments, said three people familiar with the Biden administration deliberation. One of the people said the U.S. has put “everything on the table” to persuade Maduro to leave before his term ends in January.

Another person familiar with the talks said the U.S. would be open to providing guarantees not to pursue those regime figures for extradition. The U.S. in 2020 placed a $15 million bounty for information leading to Maduro’s arrest on charges of conspiring with his allies to flood the U.S. with cocaine.

The talks represent a flicker of hope for a Venezuelan political opposition that meticulously collected voter tallies showing its candidate, little-known former diplomat Edmundo González, defeated Maduro in a landslide in the July 28 election. Over the past two weeks, Maduro has jailed thousands of dissidents, maintained the military’s loyalty and tasked the Supreme Court, stacked with his handpicked allies, with resolving the election impasse, buying him time.

International action may be the only avenue to force out Maduro, who over 11 years of authoritarian rule has overseen an economic implosion, diplomatic isolation and the exodus of nearly eight million Venezuelans—more than war-torn Syria and Ukraine. Maduro has given transnational gangs a safe haven, U.S. and Colombian officials say, and allowed Russia, China and other U.S. rivals to gain a foothold in the Western Hemisphere.

Maduro’s total grip on power stacks the odds against the Biden administration. The U.S. had made an amnesty offer to Maduro during secret talks in Doha last year, but the strongman declined to discuss arrangements where he would have to leave office, said people familiar with the matter. One person close to the regime said Maduro’s position hasn’t changed, for now.

Maduro has said that he’s open to talks as long as Washington shows him respect. At other times, he tells the U.S. to mind its own business. “Don’t mess with Venezuela’s internal affairs, that’s all I ask for,” Maduro said in a news conference Friday.

Latin America’s three most populous countries—Brazil, Mexico and Colombia—are also involved in trying to resolve the standoff. U.S. officials want these countries—run by leftist leaders sympathetic to Maduro—to take a tougher stance than their current position of pressuring him to present evidence he won.

The U.S. has five months before Venezuela’s presidential inauguration to pull off a deal, and much depends on the outcome of the presidential election in November.

A Donald Trump victory could squelch the talks if the former president revives his previous aggressive policies toward Maduro that began in 2019, when his administration leveled oil sanctions and supported a shadow Venezuelan government to topple the regime.

Still Maduro mistrusts Washington, no matter who inhabits the White House, said people familiar with the sentiment in the Venezuelan capital, Caracas. This includes the Biden administration, even though it had lifted most economic sanctions in the hope of fostering a free and fair July election.

Focus on carrots, not sticks

So far, the talks have taken place virtually between Jorge Rodríguez , president of Venezuela’s congress and a Maduro confidant, and Daniel P. Erikson, who directs policy toward Venezuela at the White House National Security Council. U.S. officials have signaled that they won’t force Western oil companies to leave Venezuela.

An NSC spokeswoman declined to comment on diplomatic engagements with Caracas. The U.S., she said, supports international efforts to demand transparency over the vote result and “will determine next steps based on our national interests and take action at the time of our choosing.”

The Biden administration “is focusing on carrots, like offering to lift the indictments in exchange for transition talks, rather than sticks like sanctions,” said Geoff Ramsey, a Venezuela expert at the Atlantic Council, the Washington think tank.

Ramsey said Republicans could use the engagement with Maduro to attack the Democrats in an election year, which could be damaging if the U.S.’s efforts fall through.

Vote count persuaded U.S. to act

The U.S. attempt to offer Maduro a face-saving option dovetails with the opposition’s strategy, which favors negotiations that would include guarantees for regime leaders and a transition to a González government .

The U.S. talks wouldn’t be happening without the Venezuelan opposition’s monthslong preparations to document and make public the vote tally, which showed González won by almost 38 percentage points, collecting 7.3 million votes to Maduro’s 3.3 million.

Opposition leaders said they were sure Maduro would steal the election. He had already banned the most popular opposition leader, María Corina Machado, from running.

They decided their best shot at documenting victory was to obtain the paper tabulation of the ballots that every Venezuelan voting machine emits, known as an acta . Venezuelan law requires actas be made publicly available. The opposition trained tens of thousands of poll watchers, who are permitted into voting stations to retrieve the actas , which look like a grocer’s receipt.

An opposition organizer said: “I told our poll watchers: ‘They can try to kill you but don’t leave the voting table until you have the actas .’”

As the voting ended, poll workers noticed González was winning at station after station, even in the Caracas neighborhood called 23rd of January—a stronghold for the radical leftist movement that has ruled for a quarter-century. “We couldn’t believe it,” said one poll worker.

Another poll worker across town was stunned as he saw Maduro losing in districts that had been “hyper-Chavista,” referring to the president’s predecessor and mentor, Hugo Chávez .

Soldiers, who normally carry out the regime’s orders, did nothing to stop the opposition’s effort, the whole process amounting to a mini-rebellion against Maduro in a country where he controls every institution, including the National Electoral Council.

“They were happy,” the poll worker in 23rd of January said of the soldiers. “It was surprising.”

The poll watchers, using a QR code on the actas , sent the results electronically to the opposition. They also kept physical copies, posting many on social media.

Regime allies and the military managed to throw out some opposition poll watchers and seized actas in some voting stations. But it wasn’t enough to stop the flood of evidence.

Long after the voting ended, the regime was silent, even though the country’s modern electronic-voting system is designed to spit out results minutes after polls closed. It wasn’t until after midnight that the election council’s president, Maduro confidant Elvis Amoroso, said the president had won, citing no evidence.

By then, the opposition was on its way to collecting 83% of the acta s. Their tally showed González had won far more votes in every Venezuelan state and nearly 300 of 330 counties.

Jennie Lincoln , who oversaw the Carter Center’s effort to monitor the election, said Amoroso didn’t present station-by-station results, as required by electoral law, and still hasn’t. Without offering proof, the regime has said a North Macedonian hacker had breached the system, making it impossible to publicly share the actas .

“And the hacking,” Lincoln said, “it’s bogus.”

Amoroso didn’t explain how he determined Maduro had won, having never shown others at the election-council headquarters the actas on which the election outcome is based, said Enrique Márquez, a former presidential candidate who had a representative at the headquarters on election night.

The results collected by the opposition were similar to pre-election surveys by independent pollsters and exit polls. The opposition digitized the actas and published them on a website accessible to any Venezuelan. “We were able to show the world the truth and what had happened in Venezuela,” Machado told The Wall Street Journal.

The regime response

From the presidential palace, Maduro, 61, has called the opposition’s strategy a coup and launched a crackdown, with his regime pledging to investigate Machado and González.

As of the end of the week, Maduro said more than 2,400 dissidents and protesters had been arrested.

National Guard troops and the regime’s paramilitary gangs, the motorbike-riding “colectivos,” have attacked protesters. Antigovernment activists have fled to Colombia, while hundreds of Venezuelans who had publicly come out against Maduro report that their passports have been annulled. The human-rights group Provea says 24 people have died.

“There will be no forgiveness,” Maduro warned his adversaries. Two prisons will be built to hold the new political prisoners, the president said, with many toiling away at hard labor.

Eric Farnsworth , a former American diplomat and analyst at the Council of the Americas policy group in Washington, said the election results stunned Maduro. Farnsworth said the strongman has signaled he’s willing to take Venezuela toward a more hard-line dictatorship, like that of Nicaragua under Daniel Ortega , where political killings are far more common and no dissent is brooked.

“He’s been shown to be unpopular and also illegitimate. How does he combat that? With further oppression,” said Farnsworth. “As a practical matter, it makes him more dangerous. That makes being in the opposition a very risky thing.”

The regime has announced what it calls Operation Knock-Knock, which means a knock at the door at any hour and arrest. In one case that went viral, uniformed agents recently showed up at the home of a young man without a warrant. The proof of wrongdoing: a video of him protesting.

“Inciting hate,” an agent told the family, showing them the video on his phone. Relatives demanded to see a warrant but the agent warned, “If you want to make this worse, we’ll make it worse,” before they took the man away. The family posted a video of the encounter online.

Maduro is trying to steer people from X and WhatsApp, ordering that Elon Musk ’s company be blocked for 10 days and exhorting Venezuelans to deinstall WhatsApp to suppress information about the vote and the crackdown.

Machado said change can come if the opposition can keep its people on the streets.

But there are consequences for those going up against Maduro, said Juan Barreto, a former Caracas mayor once closely aligned with the regime. After calling for the regime to release the actas , he infuriated his old comrades—some of whom are calling for his arrest.

“This is a moment to remain calm and have nerves of steel,” Barreto said.

Write to Juan Forero at juan.forero@wsj.com