Newspapers hailed Thursday's win as the "Miracle in Glasgow", reviving memories of their famous "Miracle of Miami" victory over Brazil at the 1996 Atlanta Games.
The first-half goal from Yuki Otsu gives his side a great chance of reaching the knockout rounds.
"We won! We actually won!" the Nikkan Sports daily roared on its front page, with nearly all of Japan's newspapers and broadcasters splashing dramatic headlines and photos of the jubilant squad.
The Mainichi Daily's headline boasted "Otsu sinks unbeatable Armada" while the Sports Nippon said: "In a shock to the mother nation and to the world, the 'Miracle of Glasgow' happened in the opening match of the Olympics."
"Japan blow away Spain," the top-selling Yomiuri Shimbun said, with a photo of an exuberant Otsu beside a Spanish defender lying on the pitch.
"Japan's male Olympic football squad have put in poor performances in recent times. But they fought bravely against Olympic champion hopefuls Spain and secured the admirable victory," the Yomiuri said.
It described the underdog win as a "gold star that will go down in Japanese football history", using a term usually reserved for an upset victory in sumo wrestling, one of the nation's favourite sports.
A surprise victory by the Japanese women's side against the United States at the World Cup final last year was also huge news in a country reeling from the devastating quake-tsunami disaster.
But the influential Asahi Shimbun on Friday said the men's win was no miracle, chalking up their success to a solid performance.
The government also got a word in with Chief Cabinet Secretary Osamu Fujimura hailing the men's victory, after the women's side also notched up a win over Canada this week.
"After the great news about the women's team, it is truly a great start that the men also won against mighty Spain," he told reporters.
Photos: Shah Rukh Khan, Shweta Bachchan at Karan Johar's book launch
Photos: Sunny Deol with sons Karan and Rajvir at Mumbai airport
Photos: 10 beautiful moments that capture winter around the world
Photos: Karisma Kapoor, Preity Zinta, Shraddha Kapoor at Mumbai airport
Spotted: Anushka Sharma and Diljit Dosanjh at Mumbai studio