Shakhtar Donetsk have announced the signing of Atletico Mineiro attacker Bernard for €25 million (£21.5m).
The youngster had been the subject of interest from Arsenal and Tottenham, but their bids were rejected by the Copa Libertadores winners.
Bernard's father and his agent had both appeared to be holding out for a move to Porto, but Minerio president Alexandre Kalil had stated on several occasions that the Portuguese champions had not made a bid.
Shakhtar did have an offer accepted last week, however, and although Bernard insisted that no agreement was in place despite having travelled to Ukraine on a private jet to inspect facilities, he has now signed a five-year contract.
Delio Duarte, the player's father, had hit out at Kalil for "treating his son like a puppet" by only entering negotiations with the Ukrainian champions in order to make more money.
Duarte also insisted that joining Porto would be his son's best chance of making Brazil's World Cup squad.
Agent Adriano Spodato had also suggested that a move to eastern Europe, or the Premier League, would hamper the 20-year-old's chances of featureing in Luiz Felipe Scolari's plans.
But that stance softened over the wekeend, with Spodato claiming that Donetsk is the best place for his client to progress his career.
Bernard starred alongside Ronaldinho and Jo as the Belo Horizonte side won the Copa Libertadores in July, and was part of the Brazil squad that won this summer's Confederations Cup.