Luisa Ortega refused to recognize her sacking, or the assembly's swearing in of Tarek William Saab, the national ombudsman, in her place.
Caracas: A new assembly loyal to President Nicolas Maduro on Saturday fired the country's attorney general, Luisa Ortega, one of his most vociferous critics, triggering a firestorm of condemnation from the US and Latin American nations.
Ortega, who was barred by dozens of soldiers from entering her offices, has been a thorn in Maduro's side for months, breaking ranks with him over the legality of the Constituent Assembly, which was elected last week in a vote marred by violence and fraud allegations.
She refused to recognize her sacking, or the assembly's swearing in of Tarek William Saab, the national ombudsman, in her place. "I am not giving up, Venezuela is not giving up and will not give up against barbarity, illegality, hunger, darkness and death," she said.
US State Department spokeswoman Heather Nauert tweeted that the "United States condemns (the) illegal removal" of Ortega, adding the move was aimed at tightening the "authoritarian dictatorship of the Maduro regime."
Colombia, Chile, Guatemala, Mexico, Panama and Peru equally slammed the decision, made by the Constituent Assembly as its very first order of business.
The assembly also said Ortega would face trial for "irregularities" from her time in office and was forbidden from leaving the country.
One of the assembly's most prominent members, Diosdado Cabello, said of the firing: "This is not a personal, political lynching, just carrying out the law." Ortega's sacking had been widely expected. But its swiftness and the fact it was a unanimous vote stirred wide unease.
Also on Saturday opposition leader Leopoldo Lopez was returned to house arrest after being detained in military prison for four days.
"They just moved Leopoldo home," his wife Lilian Tintori wrote on Twitter. "We continue with more conviction and strength for peace and freedom in Venezuela!"
Lopez had been arrested along with another opposition leader Antonio Ledezma who was released back to home detention Friday in the aftermath of the highly contested vote to create the assembly.
Maduro and his Socialist party have "completely taken hostage" Venezuela's institutions through "an undemocratic mechanism that is utterly dictatorial," the leader of the opposition-controlled legislature, Julio Borges, told reporters.
The opposition has vowed to maintain street protests against the assembly. Four months of demonstrations violently matched by security forces have left at least 125 people dead.
But the rallies grew more muted this week as the assembly vowed to go after those seen as inciting street action. As Ortega's firing was announced, Argentina, Uruguay, Paraguay and Brazil declared Venezuela was indefinitely suspended from the South American trading bloc Mercosur for its "rupture of the democratic order."
The office of the head of the Organization of American States endorsed the suspension. "The countries of the region must continue to tell the Venezuelan regime that in the Americas, there is no place for dictatorships or for the tyrants that lead them," it said in a statement.
The international onslaught added to US sanctions imposed on Maduro after the Constituent Assembly's election. Maduro responded in an interview with an Argentine radio station that "Venezuela will not be taken out of Mercosur never!"
He accused his Argentine counterpart, Mauricio Macri, of trying to impose a "blockade" on Venezuela and US President Donald Trump of wanting to grab the country's vast oil reserves.
Trump's national security advisor, H.R. McMaster, this week ruled out foreign military intervention and said Washington did not want to give Maduro a pretext for blaming the US for his mounting woes.
The United States, the European Union and major Latin American nations have all rejected the Constituent Assembly. The body's legitimacy was struck a hard blow this week when a British-based firm that supplied the voting technology, Smartmatic, said the turnout figure was "tampered with" and greatly exaggerated.
The principal task of the Constituent Assembly is to rewrite the constitution, something Maduro promised will resolve Venezuela's troubles. "We are going to win back peace," the president said.
While working on its mission, the assembly holds supreme powers over all other branches of government. Initial suggestions were that it would need only six months to complete its work.
But it announced on Saturday that it would stay in place for up to two years beyond the end of Maduro's term, due to end in 2019. Its 545 members, including the president's wife and son, are all Maduro allies because of an opposition boycott during the vote.
It is led by Maduro's fiercely loyal former foreign minister, Delcy Rodriguez, who branded Colombian President Juan Manuel Santos an "usurper" for calling the assembly "illegitimate."
Maduro has around 20 percent public support, according to surveys by the Datanalisis polling firm. Ordinary Venezuelans are struggling, with food, essentials and medicine scarce, the currency rapidly depreciating, and inflation soaring.
Thousands have sought shelter in neighboring countries, particularly Colombia and Brazil.