The basin is located mostly ( 54 % ) in Brazil , but also goes into Peru and several other countries . The basin is located mainly ( 40 % ) in Brazil , but also stretches into Peru and several other countries .