The Trump administration has revoked the visa of Brazil’s ambassador to the United States, escalating a diplomatic dispute between Washington and Brasília over visa approvals and the delayed nomination of a new U.S. ambassador to Brazil.

A State Department spokesperson said the visa action against Ambassador Maria Luiza Ribeiro Viotti followed weeks of talks with the Brazilian government. «We communicated continually with the Brazilian government for weeks and have given the Brazilian government every opportunity to do the right thing, yet they have continually delayed and obfuscated», the spokesperson said. The official said the decision was made after weeks of trying to resolve the matter through diplomatic channels.

Brazil denied visas to two American diplomats last month and has not yet approved Danny Perez, a former speaker of the Florida House of Representatives who has been nominated by President Donald Trump to serve as ambassador to Brazil. Perez would need Brazil’s approval before taking up the post. The State Department described the revocation of Viotti’s visa as «a reciprocal action» and said further diplomatic measures remain possible if Brazil continues to delay or refuses to approve Perez.

Viotti has not been declared persona non grata and is not being expelled from the United States, the spokesperson said. She could resume her duties if Brazil approves Perez. If she leaves the U.S., however, she would have to reapply for a visa before returning.

Brazil’s move to deny visas last month affected Riley Barnes, the assistant secretary of state for democracy, human rights and labor, and one of Barnes’ top aides. The State Department said the pair planned a routine visit focused on election integrity, religious freedom and freedom of expression, and it rejected claims that they intended to criticize Brazilian President Luiz Inácio Lula da Silva or the country’s electoral process.

The visa dispute is also playing out as Brazil approaches a major election. President Lula is set to face Senator Flávio Bolsonaro, the son of former President Jair Bolsonaro, in the Oct. 4 vote.

The Trump administration has separately imposed tariffs of up to 37.5 percent on thousands of Brazilian exports and designated two major Brazilian drug-trafficking groups as foreign terrorist organizations. Those measures have added to the tension surrounding the visa dispute.

The visa revocation stops short of expulsion, but it leaves Viotti unable to re-enter the United States if she departs unless Brazil approves Perez. U.S. officials have said further diplomatic measures remain possible if Brasília keeps delaying the nomination.