Barcelona has struck a shirt sponsorship deal worth £47m ($58m) a year with Japanese online firm Rakuten.
It is one of the biggest football shirt sponsorships yet seen and could make Barcelona wealthier than Real Madrid, currently the world's richest club.
The deal will begin with the 2017-18 season and last for four years.
It will earn the club at least £188m in that time, with more to come if the team wins the Spanish championship or the Champions League.
"This agreement puts us at the forefront of sports club sponsorships, which has always been an objective for the current board of directors," said the Barcelona president Josep Maria Bartomeu.
He added that negotiations began in 2015 at a dinner in San Francisco organised by defender Gerard Pique, who is a friend of Hiroshi Mikitani, the chairman and chief executive of Rakuten.
The deal with Rakuten may be extended for a fifth year.
Rakuten is Japan's biggest e-commerce firm and employs more than 13,000 staff in Japan, with a turnover of nearly £15bn in the first nine months of this year.
It already owns the J-League club Vissel Kobe and baseball club Tohoku Rakuten Golden Eagles.
Analysis by Simon Atkinson, Asia business reporter
If this deal was about improving awareness of Rakuten in Asia, the whopping fee wouldn't make sense.
As well as being a big employer and household name, it's already pretty high profile in Japanese domestic sport. And as much as Asian fans like La Liga, the kick off times of Spanish games - usually around 21:00 at night - is a very non TV-friendly time in Tokyo or Taipei.
So this is clearly an effort to raise Rakuten's profile globally, associating itself with the famous red and blue stripes and players like Lionel Messi and Neymar.
Interestingly Rakuten announced in June that it was closing down its Spanish and UK operations to focus on other European markets - so it'll be interesting to see how it leverages the deal to make sure the sponsorship is money well spent.
But there are plenty of Asian firms who can vouch for European football sponsorships doing wonders for their brand recognition - be that Sharp's long running sponsorship with Manchester United in the 1980s and 90s to Thai beer firm Chang sponsoring Everton and Hong Kong's AIA backing Tottenham Hotspur.
Barcelona, with star players such as Lionel Messi, Luis Suarez, and Neymar, will become even wealthier from 2018 when the club starts a new 10-year kit sponsorship deal with the US sportswear firm Nike, which is reportedly going to pay £134m a year.
The Spanish club first accepted sponsorship only in 2006 in a deal with Unicef, which in fact involved the club donating to the charity.
But in 2010 the shirts became sponsored mainly by the Qatar Foundation (replaced by Qatar Airways in 2013), in a £24m per year deal which was at the time the most lucrative sponsorship deal in world football.
Reflecting the massive inflation in football advertising and investment, which has been mainly due to international TV coverage, Manchester United has let its shirts be sponsored by the US carmaker Chevrolet for £47m a year for seven years, alongside a kit deal with Adidas worth £74m per year.
The extra money for Barcelona will help it to pay for the planned expansion of its Nou Camp stadium to 105,000 seats.
According to this year's Deloitte Football Money League, the richest club in the world was Real Madrid, followed by Barcelona and Manchester United.