Swiss tennis player Roger Federer returns a ball to Australian tennis player Nick Kyrgios during the Madrid Open tournament at the Caja Magica (Magic Box) sports complex in Madrid on May 6, 2015. Kyrgios won 6-7 (2/7), 7-6 (7/5), 7-6 (14/12). AFP PHOTO/ JAVIER SORIANO (Photo credit should read JAVIER SORIANO/AFP/Getty Images)

Roger Federer has parted ways with coach Stefan Edberg.

The former world No.1 will now work with Croation Ivan Ljubicic.

Ljubicic retired from professional tennis in 2012 and reached a career high ranking of No.3 in the world in May 2006.

"After two year successful years, I would liek to thank Stefan Edberg, my childhood idol, for agreeing to join my team," Federer said in a statement on his official Facebook page.

"Although it was supposed to only be for 2014, Stefan was great and agreed to extend the partnership through this year which I really appreciated. He taught me so much and his influence on my game will remain.

"Severin Luth, who I have been working with since 2008, will continue to be my main coach and he will be joined by Ivan Ljubicic."