Barcelona on Tuesday announced the €41million (approx. $47.9 million) signing of Bordeaux winger Malcom, only a day after he appeared set to join Serie A side Roma.

The Brazilian attacker has agreed to a 5-year contract and will undergo his medical tests Wednesday before joining the Catalan giants on the club's preseason tour.

Premier League giants Arsenal and Tottenham reportedly were interested in the 21-year-old, but Roma emerged as the most likely contender for his signature this week.

Bordeaux announced on Monday that a €40m deal had been agreed upon with Roma, but Malcom reportedly rejected the switch in favor of a move to Camp Nou.

Malcom, who scored 12 goals in Ligue 1 last season, has developed into one of Europe's hottest talents since his arrival from Corinthians in 2016.

And the Brazilian will now have a chance to impress in LaLiga having sealed a move to champion Barca, which also won the Copa del Rey under Ernesto Valverde last term.

Malcom joins compatriot Arthur, also uncapped, on the Barca squad for the 2018-19 campaign, with the Catalans getting their title defense started Aug. 19 against Deportivo Alaves.

The deal includes a further €1m in add-ons on top of the intial €41m.

Malcom scored 23 goals and contributed 16 assists in 96 games for Bordeaux in his 2 1/2 seasons with the club.