By Steve Keating

OMAHA, Nebraska (Reuters) - Michael Phelps gave the home fans one last thrill when he touched first in the 100 meters butterfly at the U.S. Olympic trials on Saturday in his final race in an American pool.

The world record holder and three-time Olympic champion in the event, Phelps would not be denied a winning sendoff as he charged to the wall to the roar of a capacity crowd in a time of exactly 51 seconds, just ahead of Tom Shields.

With his trials over, Phelps heads to Rio for what he says will be his fifth and final Games qualified in three events; the 100 and 200 butterfly and 200 individual medley, ready to add to his staggering record total of 22 Olympic medals.

"Bob (coach Bowman) asked me what the game plan was tonight and I said, 'I don't want to lose my last race on American soil'," said Phelps.

"There's been a lot of history here and 51 (seconds) is OK but it's going to take more than that to win a gold medal."

Phelps began his final U.S. race from an unfamiliar spot, lining up in lane seven.

But everything else was vintage Phelps as he powered into the lead over the final 50 meters.

When he hit the wall, the 31-year-old immediately turned and looked up at the clock, clenching his fist and punching the water underscoring how much the win meant to him.

As he climbed out of the pool the crowd stood and cheered the 18-time Olympic champion, who raised both hands in the air, soaking up the moment as he turned to all for corners of the arena taking a final bow.

While Phelps came through with the victory almost everyone at the packed CenturyLink Center wanted to see, Katie Ledecky cruised to a commanding win in the women's 800 meters freestyle but could not deliver the first world record at the trials that many expected.

After clocking the third fastest time ever in the event during Thursday's preliminaries, the Olympic and world champion looked primed to eclipse her own world mark of 8:06.81.

Ledecky went out in world record pace but faded on the back half and finished in 8:10.32, a comfortable 10 seconds clear of her nearest challenger Leah Smith.

Like Phelps, Ledecky will also go to Rio having qualified in three events, the 200, 400 and 800 free. She hopes to become the first swimmer since 1968 to complete the Olympic gold medal distance hat-trick.

Maya DiRado's first Olympics will be a very busy one, after the 23-year-old added the 200 meters backstroke to her Rio dance card to go along with wins in both the 400 and 200 individual medley.

DiRado capped off a productive trials in impressive fashion beating a desperate Olympic and world record holder Missy Franklin to the wall with a time of 2:06.90.

Elizabeth Beisel, the bronze medalist in London, finished seventh.

Nathan Adrian, the 100 meters free winner, will be doubling up, blitzing to victory in the 50 free in 21.51 seconds ahead of Anthony Ervin and 2012 Olympic silver medalist Cullen Jones.

(Editing by Andrew Both)