SAO PAULO (AP) — A top Brazilian judge issued on Friday a restraining order on a former attorney general who said he once carried a gun to the tribunal to shoot one of its members.

Justice Alexandre de Moraes on Friday barred Rodrigo Janot from being fewer than 200 meters (650 feet) away from members of the country’s top court. Janot, 63, is also prohibited from entering Brazil’s Supreme Court buildings nationwide.

Janot, Brazil’s top prosecutor between 2013 and 2017, said in several interviews that he planned to kill Justice Gilmar Mendes before a session in 2017. Janot said he decided not to shoot Mendes, one of his main critics, at the last minute.

ADVERTISEMENT

Janot was one of the main prosecutors in the capital of Brasilia who was handling the sprawling Car Wash corruption probe, which jailed scores of Latin American politicians and businessmen. Mendes had been a critic of the aggressive methods of Car Wash probe investigators.

The decision of the Brazilian Supreme Court on Friday came after Mendes filed a request for protection, calling Janot “a potential criminal.”

Federal police said they seized a weapon in Janot’s home in Brasilia.