In a balanced offensive display, every outfield player except Balazs Sziranyi Somogyi scored for Spain, which is looking for its first Olympic medal in men's water polo since winning gold in 1996.
Filipe Perrone Rocha, Albert Espanol Lifante and David Martin Lozano led the way with two goals apiece for the Spanish in the Group A match, while Billy Miller scored five times for Australia.
"We are really happy because we think that more than the result, the feeling is that the team is playing together," said Perrone Rocha, who has nine goals in three matches. "From the 11 players, 10 scored a goal, which shows the team."
Spain's win comes after a disputed 8-7 loss on Tuesday to Croatia, in which the officials didn't recognize a last-gasp Spanish shot that appeared to cross the line to level the game at the buzzer. Spain lodged an appeal to FINA, which the sport's governing body rejected.
With Thursday's win, Spain has four points from three Group A matches, positioning the country well for a spot in the quarterfinals. Australia finds itself in trouble, with just two points from three games.
Greece boosted its chances of reaching the knockout stage with its easy win over an outclassed Kazakhstan. The Greeks were never threatened in the match, holding their opponents scoreless for a 14-minute stretch to build a 7-1 lead halfway through the third quarter.
Captain Georgios Afroudakis chipped in with three goals for Greece, while Rustam Ukumanov led Kazakhstan with two.
The victory gives Greece three points from three Group A games, with Spain and Australia still to come in the preliminary stage. Kazakhstan, meanwhile, remains winless in London and sits at the bottom of the group.
Thursday's last Group A game pits group-leader Croatia against reigning world champion Italy.
Later Thursday, gold medal-favourite Serbia plays Montenegro in a highly-anticipated Group B match. Also in the group, the United States looks to extend its perfect record in London when it takes on Britain, and defending champion Hungary aims for its first win of the games against Romania.
Ryan Lucas can be reached on twitter at www.twitter.com/relucaszSuggest a correction