Maria Perez claimed the women's 20km walk on Sunday to make it a golden double for Spain in the discipline.
On Saturday, in the first final at the 2023 world athletics championships in Budapest, Alvaro Martin won the men's race in one hour, 17 minutes and 32 seconds - the fastest time this year.
His compatriot came through the finishing tape at Heroes' Square in one hour, 26 minutes and 51 seconds.
Jemima Montag from Australia was second nearly half a minute behind Perez and Antonella Palmisano from Italy took the bronze medal with a season's best time of one hour, 27 minutes and 26 seconds.
Perez increased her pace to take control took control of Sunday's race after 16km. Palmisano, who had been leading for three kilometres, briefly fell to sixth but recovered her poise over the final three kilometres to hold off the Peruvian Kimberley Garcia Leon.
"I wasn't thinking of winning," said Perez. "I just wanted to go out there and race. I knew that I could do the last five kilometres fast and that's what happened."
Montag said that she decided to follow Perez when she made her break. "In the last few big events, I haven't had the belief to go with it. I didn't have the confidence at the Olympics and at last year's world championships I wasn't quite right physically.
"This year the preparation has been much better," added the 25-year-old.
"When Maria went, I thought: 'I'm coming with you'. I didn't really think I could challenge for the gold but I thought if we can put enough distance on the bronze and below then I thought it would be worth digging deep to go with her."
Perez, who holds the world record over 35 km, said she might not compete in that race on 24 August.
"I felt a little problem in my hamstring," she added. "I will check with my medical team to see if I will able to take part."