The Dutch avenged their defeat by the same opponents in the 2010 final in outrageous style, with four unanswered goals in an irresistible second-half display in Salvador.
Van Persie and Robben scored two apiece, with each man’s first a minor classic in its own right.
Defender Stefan de Vrij scored his side’s third.
Vincent Del Bosque’s side, who also lost their opener against Switzerland four years ago, had taken the lead through Xabi Alonso’s disputed penalty, a lead they held until van Persie’s instinctive flying header levelled matters just before the break. After that, Holland were rampant, laying a big marker down for the remainder of the tournament and raising the prospect of a Brazil-Spain second-round encounter.
Holland should have taken the lead after just eight minutes, but Wesley Sneijder botched a wonderful opening. Robben produced the pass that sent Sneijder bearing in on goal but he snatched at his lofted shot and allowed Iker Casillas to thrust his right glove up and make the save.
Spain rallied quickly from that scare and 20 minutes in the Dutch were being dictated to by Xavi, Iniesta, David Silva and Xabi Alonso, with Ron Vlaar producing at least two desperate blocks.
The controversial penalty came in the 26th minute, starting with Xavi’s beautifully weighted pass for Costa. He surged into the area and took two touches before turning de Vrij, who appeared in real time to trip him.
By the time Xabi Alonso had buried the spot-kick, replays showed Costa apparently initiating contact.
Van Persie’s leveller came when the Manchester United man read the situation perfectly as he leapt to head Daley Blind’s hanging cross high over Casillas.
Eight minutes into the second half Robben controlled the ball brilliantly with the outside of his boot before turning Gerard Pique and Sergio Ramos, converting with a slight deflection off the latter. De Vrij made it 3-1 from Sneijder’s curling free-kick and in the 72nd minute Casillas turned a harmless back pass into an open goal for the alert Van Persie.
Robben completed Spain’s misery with 10 minutes left, reducing Casillas and his defenders to a floundering mess as he made room for an emphatic finish.