By Sharon Bernstein

SACRAMENTO, California (Reuters) -- Three men who foiled an attack by a suspected Islamist militant on a high-speed train headed to Paris were honored as hometown heroes in California's state capital of Sacramento on Friday with a street festival and parade that drew thousands despite scorching heat.

Anthony Sadler, 22; Spencer Stone, a 23-year-old U.S. airman; and National Guardsman Alek Skarlatos, 22, were touring Europe last month, partly to celebrate Skarlatos' return from a tour of duty in Afghanistan, when they took down the man armed with a box-cutter, a pistol and an AK-47 assault rifle.

"It was not a surprise, nor was it an accident that of the hundreds of international passengers on that train that it was three Americans who acted with such courage," Sacramento Mayor Kevin Johnson said in a speech in a rally on the steps of the state Capitol building. "And it was not a surprise nor was it an accident that these Americans were Sacramentans."

Sacramento, a mid-sized city still suffering in some parts from the 2007-2009 financial crisis, has been buzzing with pride over the trio's actions.

Johnson, a Democrat, wearing a crisp white suit and open-collared shirt on a day expected to reach 105 degrees Fahrenheit (41 Celsius), presented them with keys to the city.

As the parade moved toward the Capitol, the three took selfies and waved from a slow-moving float, with their parents just ahead of them in vintage cars.

The Painted Ladies, a rodeo riders group on horseback, and students from the high school that the three attended in suburban Sacramento marched with them.

Food trucks offered snacks, bands played and confetti rained down as the procession passed under two American flags raised high on Sacramento Fire Department cranes.

At the rally, state lawmakers suspended deliberations on the busy last day of the legislative session to participate and presented the men with proclamations from the Senate and Assembly.

The three spoke briefly, thanking the crowd and highlighting the day's significance as the anniversary of the Sept. 11, 2001, attacks on the United States by Islamist militants.

Stone's left thumb was almost severed in the struggle with the gunman. French President Francois Hollande bestowed France's highest honor on the three men, awarding them the Legion d'honneur.

(Reporting by Sharon Bernstein; Editing by Mohammad Zargham)