Brazil's foreign minister has resigned amid diplomatic tensions after Brazilian diplomats spirited away a Bolivian opposition senator wanted for corruption.

The resignation of Antonio Patriota was announced in a terse, two-paragraph statement from the office of President Dilma Rousseff on Monday.

The statement named Luiz Alberto Figueiredo, a career diplomat and most recently Brazil's head of mission at the UN, as the new foreign minister. He served only two months as the head of Brazil's UN delegation.

A Rousseff spokeswoman said Patriota, a former ambassador to the US, would now take the top spot at the UN.

Eduardo Saboia, the Brazilian charge d'affaires in La Paz, revealed earlier on Monday that he helped Roger Pinto, a Bolivian senator, escape to Brazil after he was holed up for 15 months in Brasilia's embassy in the Bolivian capital despite having been granted asylum.

Pinto, an opponent of Bolivian President Evo Morales, made his escape Friday in an embassy car escorted by Brazilian marines, driving 22 hours to the southwestern Brazilian city of Corumba, 1,600km from La Paz.

"I chose life. I chose to protect a person, a persecuted politician, like [Brazilian] President Dilma [Rousseff] was persecuted," Saboia told Globo television on his arrival in Brasilia, where he was recalled for consultations.

He said he made the personal decision to help Pinto escape "because there was an imminent threat to the life and dignity of the senator."

Saboia said Pinto was suffering from depression and was contemplating suicide.

The Bolivian government views Pinto as a fugitive from justice after he was accused of corruption, for which he was sentenced to a year in prison.

He sought refuge at the Brazilian embassy last year, claiming to be a victim of political persecution after he denounced alleged cases of corruption and alleged links between authorities and drug traffickers.

His case strained relations between La Paz and Brasilia. Morales last year said Brazil's decision to grant Pinto asylum was "a mistake".

In La Paz, David Choquehuanca, Bolivian foreign minister, expressed "deep concern over the transgression of the principle of reciprocity and international courtesy".

"Under no condition could Senator Pinto leave the country without a safe conduct pass," Choquehuanca said.

Figueiredo, 58, served as Brazil's undersecretary for environment, energy, science and technology at the foreign ministry before taking over Brazil's UN mission.