RIO DE JANEIRO — The news coverage was breathless, political speculation was rampant and satirical Twitter memes flew after former President Michel Temer of Brazil was taken into custody on Thursday in connection .with a sweeping corruption probe known as Carwash.

Mr. Temer’s arrest did not come as a surprise. The 78-year-old politician, who for decades wielded enormous influence in Brazil’s notoriously transactional political system, has long been dogged by accusations of corruption.

But it was the second jailing of a former Brazilian president in as many years. And, in an unusual step some saw as overly harsh, a federal judge in Rio de Janeiro ordered Mr. Temer’s detention as a precautionary measure as the authorities investigate what they say is a pattern of kickbacks and money laundering he oversaw. The continuing Carwash scandal has tarnished much of Brazil’s political elite and could threaten the current government’s agenda.

What is Carwash?

In 2014, federal police officers and prosecutors with expertise in money laundering exposed a wide-ranging scheme that came to be known as Lava Jato, or Carwash, after they stumbled onto suspicious currency transactions at gas stations in Brasília, the capital.