(CNN) -- Jose Mourinho will leave Real Madrid at the end of the season, the nine-time European champion's president Florentino Perez announced at a news conference on Monday.
By his own admission Mourinho, who won one La Liga crown and a Copa del Rey with Real after taking charge in 2010, has endured what he has called his "worst season" in management.
"The club and manager agree that the timing is right to bring the relationship to an end," said Perez.
"On behalf of the board of directors, I would like to thank Jose Mourinho for all his hard work over the last three years."
Mourinho will stay on for Real's remaining league fixtures, with an away trip to Real Sociedad on May 26 and a final home game at the Bernabeu on June 1 against Osasuna.
Real will finish second in La Liga this year, trailing champions Barcelona by 12 points after 36 rounds.
The parting of ways comes three days after Mourinho was sent off as Real lost the Copa del Rey final 2-1 to Atletico Madrid, a first defeat by their neighbors in 14 years.
Real president Perez explained that the decision was a "mutual agreement", so paving the way for Mourinho to make a return to England's Premier League.
"I know in England I am loved," said the Portuguese last month. "I know I am loved by some clubs, especially one."
The 50-year-old has been heavily linked with a return to former club Chelsea, where he won two Premier League titles and one FA Cup between 2004 and 2007.
This year's Europa League champions will be without a coach on June 1, with the contract for interim manager Rafa Benitez expiring at the end of May.
The decision to part ways via "mutual agreement" means neither Real nor Mourinho will have to pay one another millions of dollars in compensation had either of them broken the terms of their contract.
After winning La Liga last year, Mourinho had signed a new four-year deal with the Merengues.
The compensation package was believed to be a potential obstacle to his return to Stamford Bridge, where Chelsea owner Roman Abramovich paid Mourinho and his coaching staff some $27 million after his contract ended early in 2007.
Paris Saint-Germain coach Carlo Ancelotti, who formerly led Chelsea himself, is rumored to be Mourinho's replacement.
On Monday, Perez denied that any deal has been agreed to replace the former Inter Milan and Porto manager.
"We have no pre-contract signed with any managerial candidate," he said. "It's something we'll have to look at in the coming days."
Ancelotti confirmed on Sunday that he had asked to leave the French champions, while the club's Qatari owners suggested he already had an agreement in place with Real.
Desperate to be crowned champions of Europe for a record tenth time, with their last success dating back to 2002, Real Madrid turned to Mourinho just days after he lifted the Champions League with Inter Milan, ending a barren 35-year run for the Italians.
Yet the Portuguese was beaten in the semifinals of the competition each year with Real, who were knocked out by Borussia Dortmund last month.
Without a trophy in the two years prior to his arrival, Mourinho did at least return silverware to the club - winning the Copa del Rey in his first season in charge.
In 2012, he guided Real Madrid to their first league crown in four years and amassed a record tally of 100 points along the way, so eclipsing the previous best held by great rivals Barcelona.
A new deal soon followed but matters soured this season as Mourinho clashed with several star players, notably goalkeeper Iker Casillas -- who was demoted from the first team in recent months -- Sergio Ramos and Pepe.
During his 176 games in charge, Mourinho has led Madrid to 127 victories - losing just 22 games along the way.