With 800 meters remaining in the 5,000-meter CIF Cross Country Championships in Woodward Park in Fresno on Saturday, Ryan Douglas' goal of finishing in the top 10 of the Division III race was very much in reach.

Then the Petaluma High School senior ran into an unexpected obstacle.

"He was running well, but his legs just locked up and he hit the wall," said Trojans cross country coach Cole Yungert.

Douglas, who had the ninth fastest split in the race a mile into the 3.1 mile course, wound up placing a respectable 21st out of 193 runners in the Division III race. His place and his time (15:57) was the best of any Petaluma runner in the state meet and capped his four-year varsity cross country career at Petaluma High School.

It was Douglas' third trip to state. As a freshman, he placed 80th with a time of 16:33 to help the Trojans finish fifth as a team in the CIF championships. As a sophomore, Douglas was 30th in 15:59 in the 2010 state meet when Petaluma High School teammate Forrest Shaffer placed 10th.

In Saturday's CIF championships, Aidan Goltra, a junior from Campolindo, beat St. John Bosco senior Myles Smith, the top-ranked runner in Division III, to the tape by less than a second for first place in the boys race.

Douglas, who had the eighth fastest time in the state among Division III runners entering the meet, managed to beat Steve Lepe, a senior from Monte Vista, who finished 23rd. He was ranked No. 2 prior to the state meet.

Douglas is planning to continue his cross country running career in college. Ivy League Yale University is among several colleges currently recruiting Douglas.