Ireland's Arthur O'Keeffe has finished in 25th place in modern pentathlon.
The Dublin student was lying 18th, out of 36 contenders, following the fencing, swimming and showjumping disciplines.
Some shaky shooting, however, in the final combined event moved him out of the top 20 - his targetted final position.
He confirmed afterwards that he intends to compete in Rio, in four years time, and hopes to medal there.
His best result at this Olympics was in the 200m swim, where he finished ninth.
He finished 29th overall in fencing, and 20th in horse-riding.
The gold medal was won by David Svoboda of the Czech Republic. Silver went to Zhongrong Cao, of China with Adam Marosi, of Hungary, taking the bronze.
The 20-year-old UCD Sports & Exercise Management student was the final athlete to be added to Ireland's Olympic squad.
He qualified when a Polish competitor tested positive for a banned substance.
"I went into the competition with no expectations and came out with a satisfactory result," he told RTÉ. "I gained a lot of experience and I'm really happy."
Performance Director Lindsey Weedon said Lanigan-O'Keeffe had performed really well in his first Olympics, starting reasonably well in the fencing discipline, and then swimming strongly to finish ninth, which moved him up to 21st overall after two events.
She also praised his horsemanship.
"He had a few time faults, but it was an assured performance on the horse.
"Arthur is young, and he's not had the best of preparation. He found out just two weeks' ago he was competing.
“For him, and Natalya Coyle, we are really looking to Rio. To even qualify here was huge for our programme."