EUGENE, Ore. (AP) — Kirani James of Grenada edged American LaShawn Merritt in a photo finish to win the men’s 400 meters Saturday in the 40th annual Prefontaine Classic.

James, the gold medalist in the 2012 London Olympics, bested his rival by leaning at the end to finish in 43.97 seconds, best in the world this season, in the third IAAF Diamond League event of the year.

“I always like leaving a race and having something that I need to work on,” Merritt said. “There’s a lot of spots in that race that I could work on. And the fact that I ran fast and I feel there’s still some things I could work on, that’s great for me.”

Justin Gatlin won the 100 meters with a wind-aided 9.76 seconds. Had it not been for the breeze, Gatlin’s time would have been the best in the world so far this season. It was the 2004 Olympic gold medalist’s third 100 title at the Prefontaine.

“It’s not a championship year so we’re just going out there running and gunning,” Gatlin said.

Tori Bowie won the star-studded 200 with a personal-best 22.18. Olympic gold medalist Allyson Felix, who continues to make her return from a hamstring injury in the world championships last season, came in third at 22.44. Jamaica’s Shelly-Ann Fraser-Pryce faded and finished last.

“I know where I’m at. I know what I need to work on,” Felix said. “My speed isn’t exactly there yet. Work on that and then hopefully it just keeps coming.”

Reigning Olympic gold medalist and world record holder in 110 hurdles, Aries Merritt, withdrew from the Pre on Saturday morning after he sustained a hamstring injury in practice. Pascal Martinot-Lagarde of France won the event in a season-best 13.13.

Botswana’s Nijel Amos won the 800 in a meet record 1:43.63. The race featured world record holder and Olympic gold medalist David Rushida, who pulled out of last year’s Pre because of a knee injury that sidelined him for most of last year. Rushida finished seventh.

Leo Manzano, the 2012 Olympic silver medalist in the 1,500, won the international mile in 3:52.40, also a world best this season. Kenyan Mercy Cherono won the two-mile race in 9:13.27, but fourth-place finisher Shannon Rowbury placed fourth in 9:20.25 for a new American record in the seldom-run event.

“This is my first one I’ve ever achieved, and to do it at Hayward Field is pretty special,” Rowbury said.

Breast-cancer survivor Novlene Willams-Mills of Jamaica won the women’s 400 in 40.41, while Olympic gold medalist Sanya Richards Ross faded to sixth.

Kenyan Helen Obiri won the 1,500 in 3:57.05. Other winners included Souleiman Ayanleh of Djibouti, who won the Bowerman Mile in a meet-record. 3:47.32; Kenyan Caleb Mwangangi Ndiku, who won the 5,000 meters in 13:01.71, Russian Anna Chicherova with a leap of 6 feet, 7 inches; Renaud Lavillenie of France with a pole vault of 19-0 1/4 and American Will Claye with a triple jump of 57-11 1/4.

The Prefontaine in recent years has opened on Friday night with free admission for track fans. They were not disappointed this year: Galen Rupp broke his own American record in the 10,000 meters, finishing in 26:44.36.

Rupp was looking to challenge the mark of 26:48 he set in 2011, and had asked organizers for a fast race. He got it: His finish in the Diamond League event was the second-fastest run on American soil.

Rupp claimed the silver medal in the 10,000 at the London Olympics, behind training partner Mo Farah of Great Britain.

Fellow Nike Oregon Project athlete Mary Cain, the talented middle-distance runner who is wrapping up her senior year in high school and has been focusing on her finals, finished eighth in her 800 section in 2:02.31. Cain decided last fall to skip a college track career and go pro.

The Prefontaine Classic is named for the legendary Oregon runner Steve Prefontaine, who died in 1975.

More from Around NYC