Spain playmaker Aitana Bonmati scored once and created another goal as the world champions came from behind to beat Japan 2-1 in the opening Group C match of Olympics women's football competition in Nantes.
Olympic debutants Spain recovered from going behind to an early goal to avenge a 4-0 group stage loss to the Asians in last year's World Cup, which they went on to win.
Japan opened the scoring in the 13th minute when Aoba Fujino's superb free kick sailed into the top right corner, with goalkeeper Cata Coll only managing to get a finger to it.
Ballon d'Or winner Bonmati equalised for Spain only nine minutes later with an easy finish off a through ball by Athenea del Castillo after they cut through Japan's defence.
Spain dominated possession in the second half and took the lead in the 74th minute courtesy of a Mariona Caldentey strike following a Bonmati pass to go top of the group.
Elsewhere, reigning Olympic champions Canada also claimed a 2-1 comeback victory over New Zealand in St Etienne in Group A.
Cloe Lacasse and Evelyne Viens scored on a night that might have been a routine group win for Canada before it was thrust into the global spotlight due to a scandal that saw manager Bev Priestman sit out Thursday's game and two staff members sent home amid allegations of drone use at two New Zealand practices.
Assistant Andy Spence acted as coach, while Priestman, who had removed herself from the game after New Zealand's complaint, watched it from the team hotel.
The full fall-out from the scandal is yet to be known, as Canada Soccer has launched an independent external review into the matter while FIFA has begun disciplinary proceedings.
Joseph Lombardi, one of the staff members sent home, was handed an eight-month suspended jail term and his material was confiscated, a French court said.
New Zealand coach Indiah-Page Riley, meanwhile, said the scandal "lit a fire in our bellies."
Mackenzie Barry shocked the Canadians by opening the scoring with a goal in the 13th minute when she fired home off the underside of the crossbar after Katie Kitching's corner.
But Canada proved too strong for the women's football minnows, whose best Olympic finish was a quarter-final appearance in 2012, and Lacasse levelled in first-half added time, stabbing home from close-range after some exquisite passing.
Viens netted the winner in the 79th minute in front of a sparse crowd at Geoffrey-Guichard Stadium, when she ran onto a pinpoint long pass from Jessie Fleming and fired first-time into the far corner from a tight angle.
Women's football continues with medal contenders Germany, Australia, Brazil and the United States kicking off their Olympic campaigns later on Thursday.