RIO DE JANEIRO — Brazil’s foreign minister on Tuesday excoriated the surveillance practices of the United States, dismissing as unsatisfactory Secretary of State John Kerry’s explanation of the wide-ranging collection of data on telephone and electronic communications and describing the spying as “a new type of challenge” in Brazil’s relationship with the United States.

Foreign Minister Antonio Patriota issued the unusual expression of indignation over the National Security Agency’s spying programs while standing next to Mr. Kerry at a news conference in Brasília, the capital, where the secretary of state had stopped on a two-day trip to South America, largely in an attempt to allay concerns in Brazil over the N.S.A.’s spying.

Resentment has festered in Brazil since revelations of the surveillance practices emerged in July, detailing how the agency established a data collection center in Brasília and prioritized Brazil, with its vast telecommunications hubs and large population of 200 million, as among the agency’s most spied-upon countries.

Washington’s ties with Brazil remain warm: President Dilma Rousseff is scheduled to go to the White House in October for a highly anticipated state visit; high-level contacts continue in areas like energy and agriculture, according to Mr. Patriota; and trade between the two countries is thriving (though still eclipsed by Brazil’s robust commerce with China). Still, the surveillance has clearly struck a nerve.