The signing of Melo has been one of the worst-kept secrets in association football ever since a picture of him together with Barcelona sporting director Robert Fernandez popped up in the media last December.
"FC Barcelona and the Brazilian club Gremio de Porto Alegre have reached an agreement on a purchase option for the player Arthur Henrique Ramos de Oliveira Melo, whereas FC Barcelona may exercise this right on the player's federative rights during July of 2018," says an official statement from the club.
Arthur has been firmly on Barca's radar since last year, when he helped Premio to their first Copa Libertadores trophy since 1995.
READ MORE: "Welcome, Ciro!" Messi's Most Important Hat-Trick
The 21-year-old has yet to make his debut for the national team, but he has been included in recent squads and hopes to be a part of the group that will represent Brazil at the World Cup in Russia this summer.