Brasília (AFP) - About 50 of the last Spix's macaws, the blue parrot made famous in the hit animation movie "Rio," will be reintroduced to the wild in Brazil from captivity in Europe, officials said Saturday.

Brazilian Environment Minister Edson Duarte is due in Brussels on Sunday to sign the agreement with Belgium and Germany for bringing the birds back in the first quarter of next year, the ministry said in a statement.

The Spix's macaw originates from north-east Brazil but is considered extinct in the wild, with only scores remaining in captivity. The medium-sized parrot sports feathers in a variety of shades of blue.

It was last seen in the wild in 1990, according to the Association for the Conservation of Threatened Parrots (ACTP), which partners the Brazilian government on the project to revive the species.

The current batch of survivors being repatriated from Europe will initially stay in special center due to open in Berlin next Thursday, where they will be prepared for the transition.

They will then move to a 72-acre reintroduction center in a conservation area of Brazil's north-eastern state of Bahia, with the first being released into the wild in 2021.

Brazil's environment ministry said that international breeding programs for the birds in captivity have seen the population grow from 79 in 2012 to 158 this year.

The ACTP says that the current population must be increased to become sustainable long term. Other needed measures include preparing the local population for coexistence in Brazil's Caatinga region, where the parrots come from originally, the group says.

Destruction of habitat and capture for trafficking are the main reasons for the near disappearance of the parrots.

Their dramatic situation formed the basis of the 2011 3D movie "Rio," in which a Spix's macaw is brought from the notoriously cold US state of Minnesota to breed with a captive Spix's macaw in Brazil, leading to a series of adventures -- and saving of the species.