BUDAPEST, Hungary (AP) — Sweden is happy when Sarah Sjostrom gets angry.

Furious with herself after a disappointing loss at the world championships, the country's star swimmer bounced back Saturday with a gold medal before breaking a world record.

"It's good to use a world championship final as a warmup for a world record," Sjostrom said. "I've been looking forward to this day all week. Now I'm (feeling) really good."

The 23-year-old won the 50-meter butterfly in the first event. She then returned about an hour later in the semifinals of the 50 freestyle to break the world record. Her time of 23.67 seconds eclipsed the mark of 23.73 set by Germany's Britta Steffen in a rubber suit at the 2009 worlds in Rome.

"Now I got the world record in 50 free, 100 free, 50 fly, 100 fly long course, and that's really nice. I'm really happy about that," Sjostrom said.

"I'm really happy I could break one of those rubber-suit records. And I think that a lot of other people are happy about that, that you can beat those 2009 times. A lot of people thought this was impossible, especially in these short distances, because the rubber suit was better for the shorter distances," she added.

Sjostrom said she set out to break the record as she had been close to the time. The 50 fly helped, too.

"The 50 fly was really fast so I (thought I) could swim one second faster in the 50 free than the 50 fly, that's just normal," Sjostrom said. "I think I surprised a lot of people. I wasn't surprised."

Sjostrom won the 50 fly in 24.60. Ranomi Kromowidjojo of the Netherlands captured the silver and Egypt's Farida Osman grabbed the bronze.

"I was very disappointed with my 100 free yesterday, but I had to move on. I knew I had the two events to go and I felt really, really good in the first 50 in both the 100 fly and the 100 free," Sjostrom said.

On Friday, Sjostrom took a bitter loss after a rookie mistake in the 100 free. She went out too fast on the opening lap and was edged at the wall by Simone Manuel of the United States.

"It's so stupid," Sjostrom said then. "The refrigerator on my back was too heavy for me. If it happens when there's 10 meters left, you can still do it. But with 25 it's too much. I thought I was unhuman the first 50, but I need to understand."

On Sunday, the first day of swimming at the worlds, Sjostrom set a world record in the 100 free on the leadoff leg of the 4x100 free relay.

"It's nice to have the world record in the four fastest events in swimming," she said. "And I'm really happy to have this record in the 50 freestyle because it really proves that I'm the fastest swimmer in the world."