By Joshua Schneyer

RIO DE JANEIRO (Reuters) - Montenegro put an early end to the medal bid of water polo powerhouse Hungary on Tuesday, clinching a spot in the semi-finals in a thrilling penalty shootout.

Also advancing were world champions Serbia, Croatia and Italy.

Hungary's men's team, the most successful in the sport's 116-year Olympic history, had arrived in Rio de Janeiro seeking to put things right after failing to reach the podium at the 2012 London Games.

The Hungarians, who have won gold nine times in previous Games, managed to battle back from an 5-3 deficit at halftime, leveling the score at 9-9 late in the fourth quarter.

In the decisive penalty shootout, however, Montenegro got the upper hand. Their goalkeeper Milos Scepanovic, 33, had shown lightning-fast reflexes to make dazzling blocks throughout the game and saved two shots in the shootout, which ended 4-2 in Montenegro's favor.

Scepanovic, who logged an impressive 13 total saves, said he blamed himself for allowing Hungary to score the late equalizing goal in regular time and felt under pressure to prove himself during the shootout.

"I was really upset because that last goal was my fault," he said. "I just didn't want to ruin a beautiful game. I'm so proud of the saves."

Through the group-round play, Hungary had shown they could hang with the best, drawing against Serbia in the first game.

Montenegro, in their 10-year history playing as a national team, have repeatedly demonstrated that they are not to be trifled with. They took second place to Serbia in this year's European championship, where Hungary placed third.

Montenegro - which before the 2008 Games had played as part of the Serbia-Montenegro team - is anxious for its first men's water polo Olympic medal as an independent team after finishing fourth in both London and Beijing.

In the second quarter-final match, a Serbian team that have dominated world water polo in recent years, and badly wants their first Olympic gold, scored their first convincing win of the Games, extending a 7-3 lead at halftime to finish off Spain 10-7.

Serbia's typically stalwart defense had looked distracted early in their five group phase games, forcing the team to mount late come-backs to squeeze through to the quarter-finals.

"I think we had concentration, especially on defense, from the very first moment until the last second," said team captain Zivko Gocic of the win against Spain. "It was the key of today's victory."

Croatia, the gold medal winner in London, also advanced by overcoming host country Brazil 10-6; Italy clinched a spot in the semi-finals with a 9-5 win over Greece.

On Thursday, Montenegro will play Croatia for a chance to advance to Saturday's gold medal match, while Serbia faces Italy.

(Reporting by Joshua Schneyer; Editing by Clare Lovell, Clare Fallon, Jan Harvey and Frank Pingue)