SALVADOR, Brazil — The Netherlands advanced to a World Cup semifinal with Argentina by beating Costa Rica 4-3 in a shootout on Saturday with substitute goalkeeper Tim Krul saving two of the penalties after the match finished 0-0 following extra time.

Costa Rica, with the excellent Keylor Navas in goal, had held out for 120 minutes against a dominant Dutch team who hit the woodwork three times — twice late in normal time and again in the frenetic extra time period.

With extra time almost up, Netherlands coach Louis van Gaal sent Krul on for Jasper Cillessen as the Dutch sought to improve on their record of one victory in five previous shootouts in major tournaments.

The towering stopper twice dived low to his left to thwart efforts from Costa Rica captain Bryan Ruiz and Michael Umana while the Dutch fired home all four of their penalties.

Returning to the scene of their opening match 5-1 mauling of defending champions Spain, the Dutch were a world away from that rampant display in a slow first half, although they still looked the more likely of the two sides to score.

Probing at Costa Rica, their first chance came after 21 minutes when Robin van Persie was slipped in only to see his low, angled shot parried away by Navas, who again similarly denied Memphis Depay minutes later.

Navas, a hero in Costa Rica’s last 16 penalty shootout win over Greece, was again in fine form, tipping wide a curling 25-meter Sneijder free kick after 39 minutes.

It was easy to see why Costa Rica’s disciplined defence had conceded just twice in Brazil, and a Dutch side that arrived as the tournament’s top scorers having rattled in 12 goals were stumped for long periods after the interval, finally producing a late flurry as extra time loomed.

A Sneijder free kick struck the post after 82 minutes and after Navas denied Van Persie’s low drive minutes later, the Dutch captain was again thwarted in the dying seconds when his driven shot was cleared off the line and onto the bar by Costa Rica midfielder Yeltsin Tejeda.

Extra time was played out with end to end breaks, the Costa Ricans looking dangerous for the first time in the match with Cillessen saving well from Umana before Sneijder thundered a curling effort against the crossbar.

In the end only penalties could separate the two sides and three-time runners-up the Netherlands will play Argentina in Sao Paulo on Wednesday.

Argentina 1, Belgium 0

RIO DE JANEIRO — Argentina reached the World Cup semifinals for the first time in 24 years after a brilliant eighth-minute goal by striker Gonzalo Higuain at the Brasilia national stadium beat Belgium 1-0.

Higuain instinctively fired the ball into the Belgian net after it was deflected toward him off Belgium defender Jan Vertonghen in what proved to be the only goal of a match dominated by defense.

“We were able to reach a semifinal which we haven’t achieved for many years. Now we need to play well and try and reach the final,” Higuain said.

“We gave our all, it’s a World Cup, it doesn’t happen every day. Now we have to think about the next game. There are two matches left to achieve this beautiful dream.”

Higuain grazed the crossbar with another powerful strike in the second half while Lionel Messi, who teased and tormented the Belgians all match, blasted the ball straight at Belgium goalkeeper Thibaut Courtois when he broke free in stoppage time.

The South Americans were content to spend most of the game defending as a disappointing Belgium struggled to make any inroads, although Kevin Mirallas and Marouane Fellaini both went close to equalising with headers.

“We were not impressed by the Argentines, absolutely not, it’s just an ordinary team,” Belgium coach Marc Wilmots growled.

“Messi is the star player, he never loses the ball but he made a couple of tackles and fouls, the referee is never against him, every time there was a little foul it was almost always in favour of Argentina.”