Trials didn't go exactly as Missy Franklin planned, but she ended on a high note.

Franklin finished second in the 200m backstroke Saturday night at the U.S. Olympic Team Trials in Omaha, Nebraska, securing a spot in that event at the 2016 Rio Olympics.

The world record holder in the event, Franklin finished behind Maya Dirado, who also put up the fastest time in the semifinals.

The 21-year-old Franklin also qualified for the 200m freestyle earlier in the week, and that race earned her a spot on the 4x200m freestyle relay team. Overall she'll compete in three events in Rio.

Missy Franklin will compete in the 200m backstroke at the Rio Olympics. USATSI

The trials started off in disappointment for the five-time Olympic medalist, as she finished seventh in 100m backstroke -- an event in which she won gold in London in 2012. Franklin also failed to make the finals in the 100m freestyle on Thursday, finishing 11th in the semifinals.

"That speed just doesn't feel like it's quite there this meet," she said after her 100m freestyle finish. "No idea why. It's super disappointing, but I really feel like my endurance is there, so it gives me a lot of hope for my 200 back."

The opening ceremony for the Rio Olympics is set for Aug. 5, and the Games will run through Aug. 21.