Born in Orange County, Calif., and raised in the States, Cavic had the fastest time of the semifinals in the 100 fly, touching in 50.92 seconds.
Cavic's father moved to the United States in 1982 after the death of dictator Josef Broz Tito.
"There is no way I'm going to bad-mouth the United States," Cavic said. "Everything I've ever had in my life [I owe] to the United States. I didn't have to live through that war, I didn't have to sleep in a bunker. So I'm very fortunate."
Cavic called Phelps "the king" when talking with reporters, but he also said that it might be good for swimming if someone were able to stand up and beat him.
"I'm not going to give it to him," Cavic said. "It would be kind of nice to one day, when people speak of Michael Phelps winning seven gold medals, and have lost the opportunity to win eight, they'll talk about that guy that took it away from him.
"I'd love to be that guy."
Phelps, however, was king once again in the 200 IM, lowering a world record he has held since 2002, when he was 17 years old.
As he climbed out of the pool, he raised a weary arm in the direction of the crowd. They responded with polite applause, perhaps still in awe of the man who, this week, has made the remarkable look almost routine.
Milorad Cavic's time in the 100-meter butterfly semifinals was misstated in an earlier version of this story. The Sun regrets the error.