The pair won their titles after a trying morning for organisers when investigation of a suspected gas leak forced them to delay the start of the women's race on the city centre course by nearly two hours.
They then had to face the logistical headache of staging both races at the same time on a tight circuit but the congested joint race passed off without problem as a large, enthusiastic crowd cheered the Spanish success.
Martin, a 24-year-old from Llerena, enjoyed the first major title of his career, making his move to victory on the penultimate of the 20 one-kilometre loops and ensuring a Spanish one-two with Diego Garcia Carrera finishing runner-up.
Martin clocked a season's best one hour 20 minutes 42 seconds, six seconds clear of Garcia Carrera, while Vasiliy Mizinov won the bronze two seconds further back.
In the continued absence of a Russian team because of the IAAF-imposed doping ban on the national federation, Mizinov was one of the Russians cleared by their doping review board to compete as an Authorised Neutral Athlete.
Like Martin, who took off his cap and waved to the crowd before the end, the diminutive 22-year-old Perez won with enough to spare to ensure the last of her 20 circuits was effectively a lap of honour.
Image credit: Getty Images
Yet her victory was even more emphatic as she won the women's race by nearly half a minute in a championship best 1:26:36.
Perez, a silver medallist in the European Under-23 championships only last year, graduated to her first senior international title after hauling back a break from Czech Anezka Drahotova.
She then forged away herself mid-race with Drahotova taking the silver in 1:27:03, while Antonella Palmisano, of Italy, won the bronze in 1:27:30.
Before the start there had been confusion for the athletes before organisers explained that the fire brigade had been called in to check the smell of gas in the vicinity of the course as a matter of standard safety procedure.