ASUNCION, Paraguay — Paraguay's President Horacio Cartes said Tuesday he was withdrawing his resignation, signaling at least temporary defeat in his effort to take a full Senate seat and extend his influence — and perhaps legal protections — after his term ends in August.

Cartes made the announcement in a tweet, expressing frustration that he'd been unable to get enough Senate votes to approve the resignation that would allow him to take up the Senate seat by the June 30 deadline, about six weeks before his presidential term ends. The country's constitution forbids officials to hold two offices at once.

The president, barred from re-election, won a Senate seat in the April 22 election, apparently hoping that the position would help extend his influence into the future. Critics also say he may be motivated by the fact a Senate seat would grant him immunity from prosecution for any crimes.

Both opposition parties and dissident members of Cartes' own Colorado Party blocked his attempt to resign.

A substitute will take Cartes' place in the Senate, but political analyst Ignacio Martinez said Cartes is likely to try again to take up the Senate seat after leaving office "because it's obvious that his objective is to have parliamentary immunity in case there are criminal complaints against him."

Before becoming president, Cartes expanded a family fortune involving two dozen businesses, ranging from banks to tobacco to soft drinks and a soccer team.

Suspicions about Cartes's business operations became widely reported after WikiLeaks published a 2010 U.S. State Department cable that labeled him the head of a drug trafficking and money laundering operation, something he has denied.

"I wouldn't want to be president if I had ties to drug traffickers," he said while running for office. "Go to the courts and check. There's nothing, not a single charge against me."

Cartes did spend 60 days in jail in 1986 during a currency fraud investigation. He was accused of making millions of dollars on a central bank loan obtained at a preferential exchange rate and then moving it through his money exchange business before buying farm equipment in the U.S. The case was dropped.

Paraguay's constitution gives Cartes and other ex-presidents an honorary Senate seat, but that is a non-voting post that many legal experts say does not carry immunity.