According to the prosecutors, construction company Engevix paid Temer bribes in exchange for a contract to build a nuclear power plant in the city of Angra dos Reis in the southern part of Rio de Janeiro state.
Prosecutors said in a statement that one Engevix executive said in plea bargain testimony that he paid more than US$300,000 in 2014 to a company owned by a close Temer associate, Colonel João Baptista Lima Filho. An arrest warrant was also issued for Lima Filho.
While the charges against Temer were narrow, prosecutors told reporters during a press conference that the former president and several associates had been engaging in pay-for-play deals involving kickbacks since the 1980s that resulted in hundreds of millions of dollars in bribes.
"Justice was created for all and everyone must respond for his own actions," President Jair Bolsonaro, a far-right former Army captain who ran on promises to crack down on endemic corruption, told reporters while on a state visit to Chile.
Temer was taken into custody in São Paulo, where he lives, and taken by plane to Rio de Janeiro, where he would be processed.
"It is evident the total lack of foundations for the arrest, which serves only to display the former president as a trophy to those that, under the pretext of fighting corruption, mock the basic rules of the constitution," Temer's lawyer Eduardo Pizarro Carnelos said in a statement.
Bretas, the judge, is overseeing the Rio portion of a massive corruption probe involving kickbacks to politicians and public officials. Since launching in March 2014, Lava Jato has led to the jailing of top businessmen and politicians, including ex-president Luiz Inácio Lula da Silva.
Former federal judge Sergio Moro, who oversaw many Lava Jato cases and became an internationally known anti-corruption crusader, stepped down at the end of last year to become justice minister.
Many worried that Moro's absence could hurt the investigations. And the probe has suffered a handful of recent defeats, including a decision by the Supreme Court to allow some corruption cases involving campaign finance, which figured heavily in the probe, to be tried by electoral courts.
This week, Moro himself suffered a setback when the speaker of the lower Chamber of Deputies in Congress slammed a tough-on-crime bill the former judge put forward and said it would only be considered after a major reform to the pension system.
Bretas' decision to arrest Temer will go a long way to answering questions about the future of the probe.
"If Lula and Temer can go to jail, who cannot?" said Carlos Melo, political science professor at Insper University in São Paulo. "There are several formerly high-ranking politicians not in office at the moment, which makes them more exposed to police investigations."
Temer, who was vice-president, came to the presidency in 2016 after President Dilma Rousseff was impeached and ousted from office for mismanaging the federal budget.
Rousseff and allies in her Workers' Party accused Temer of orchestrating her ouster, which he denied.
From the get-go, Temer's administration was hit with several scandals, including some involving the president himself. Temer's approval ratings were routinely below 10 percent, and he was frequently booed.
In the course of less than two years, three times the attorney general charged Temer, twice with corruption and one with obstruction of justice. Because he was a sitting president, he could only be tried if two-thirds of the lower chamber in Congress agreed. Temer twice mustered enough support in Congress to avoid prosecution and his term ended before the third case proceeded far enough for Congress to vote.
Temer, 78, left office on January 1 and no longer has the partial immunity that helped him avoid prosecution.
Asked about looming cases against him in December, Temer said he wasn't worried and did not believe he would be arrested.
"I'm calm. I am not the least bit worried," Temer said. "Those [charges] are such absurd things that a more objective and less passionate mind will see that and will say, 'those allegations are irrelevant.'"