Brazilian superstar Ronaldinho is set to face Dundee United and Hearts in pre-season after the Bank of Scotland Premier League clubs confirmed they would both tackle Barcelona.
The Spanish giants, who lead the Primera Liga, will head to Scotland for friendlies in late July.
Barca have agreed to field their first team, and their match against Hearts will be staged at Murrayfield rather than Tynecastle on July 28.
The match at the home of Scottish rugby is expected to attract a vast crowd, with Lionel Messi, Samuel Eto'o and Deco all in line to join Ronaldinho in Frank Rijkaard's team.
Hearts chairman Roman Romanov said: 'We are absolutely delighted that Barcelona has agreed to play Hearts in this challenge match.'
Romanov added: 'The match will represent a stern test for our squad the week before the new season begins.
'It will also be a very exciting occasion for Hearts supporters and football supporters in Scotland as a whole.'
Scottish Rugby Union chief executive Gordon McKie welcomed the decision to play the match at Murrayfield, which boasts a capacity of 67,500.
McKie said: 'Bringing the match here means a lot more supporters can see some of the world's greatest footballers than would otherwise have been possible.
'We are happy to be in a position to provide that facility. This match is also a great opportunity for Scottish Rugby to showcase Murrayfield to a different international audience.'
Barca will face Dundee United two days before their clash at Murrayfield.
The clubs famously met in the 1987 UEFA Cup quarter-final when the Terrors won both legs en route to finishing runners-up.
United chairman Eddie Thompson welcomed confirmation of the July 26 clash.
Thompson said: 'This is a dream fixture just 10 days ahead of the start of the new domestic season.
'We are delighted to be in a position to bring some of the world's greatest players to Tannadice for what should be a night to remember for all our fans and indeed for our players.'
Barcelona will be based at St Andrews from July 23 to 28, and technical director Txiki Begiristain said: 'We have chosen two very good rivals to fit our progressive preparation and we look forward to playing in front of the wonderful, world renowned Scottish football ans.'