Hearts say they will sign Rudi Skacel from Marseille once the midfielder's loan spell ends this summer, with a fee believed to be £780,000 being paid.
Rudi Skacel has had a fine season with Hearts
Speculation had linked the 26-year-old with moves to English clubs.
But Hearts announced: "The club has an agreement in place with Rudi Skacel, which was signed last summer.
"Hearts and Marseille agreed terms before Rudi joined, which has resulted in the club exercising their right to retain him for a further two years."
Skacel has become a cult hero with the Hearts fans after scoring 16 goals from midfield this season.
And he is hoping to play for the Czech Republic international side in the forthcoming World Cup finals.
However, it is not yet known whether Skacel wishes to remain at Hearts next season.
Even so, Hearts believe that the agreement with the French club ensures that the Edinburgh outfit will profit if he is sold on.