The contest pitted the 47-year-old Obama , a first-term Illinois senator who rocketed to stardom on the power of his oratory and a call for change , against the 72-year-old McCain , a 26-year lawmaker known whose mettle was tested during 5 1 / 2 years as a prisoner of war in Vietnam .