RIO DE JANEIRO — Brazilian law enforcement officials on Thursday arrested former President Michel Temer as part of a bribery investigation, opening a significant new chapter in the yearslong corruption scandal that has roiled the country’s politics.

The term of Mr. Temer, 78, expired in January. The end of his presidency left him exposed to numerous criminal investigations that he had kept at bay by availing himself of the legal protections afforded to elected officials in Brazil while they are in office.

Televised images of heavily armed police officers taking Mr. Temer into custody riveted Brazilians on Thursday, nearly a year after the nation was gripped by the imprisonment of former President Luiz Inácio Lula da Silva, who was sentenced to 12 years in prison for corruption and money laundering.

Mr. Temer, a veteran lawmaker who became a major power broker in Brasília, the capital, has been a target of at least 10 corruption investigations in recent years.