Kaka, 30, has struggled to find his best form since joining Real from AC Milan in June 2009, with frequent injury problems hindering his chances of making an impression at the Santiago Bernabeu.

Former club Milan and big-spending French side Paris Saint-Germain have both been linked with a move for the Brazil international.

Speaking after his team's 5-1 friendly win over Milan on Wednesday, Mourinho said Kaka was welcome to stay in the Spanish capital, but he will not stand in the way if the playmaker wishes to leave.

"I'm happy to keep Kaka, but I'm also happy to sell if he wants to leave because a player must be happy - that is the most important thing," he said.

"There is an unwritten rule in football that the player plays where he wants to play. When he doesn't want to play at a club then, sooner or later, he will find a way out of that club. My arms are open if he wants to stay beyond the 31st August."

"He has shown today that he is a very good player and is ready to perform at the highest level so, if he stays, that's perfect for me.

"If he decides that the best thing would be for him to leave, then Real Madrid will try to help. But nobody gets a diamond for free. If you want a diamond, you have to pay for it."