Sam Rayburn was the longest-serving speaker who served for a total of 10 terms(17 years and 53 days).