The 21-year-old French Open champion won 6-7 7-6 7-6 after former world number one Moya pushed him to the brink in a thrilling contest between two friends.