Ahead of the 2004 season, Bahia was expected to leave Flamengo, having grown impatient with delays of negotiations. He was sent on loan to Palmeiras for 1.5 months, but returned to his parent club early. It was reported that Bahia was angry with Palmeiras over not playing any games with the team. With his return at Flamengo after the loan period things improved and he fought himself back into the team. On 2 September 2004, he scored his first goal of the season, in a 2–0 win over Vitória. However, after returning to Brazil following his signing for Feyenoord, Bahia was disciplined for "a breach of contract" and as punishment, he was told to train just with the fitness coach for several weeks. He was only allowed back into the team when they ran out of central defenders due to injuries and suspensions. Despite this, Flamengo fans had Bahia's backing, even facing his darker days at the club. On the last game of the season against Cruzeiro, Bahia scored a brace for the side, as they beat Cruzeiro 6–2 to avoid relegation in Campeonato Brasileiro Série A. At the end of the 2004 season, he went on to make 35 appearances and scoring once in all competitions.