BRATISLAVA, Slovakia (AP)Slovakia captain Marek Hamšík is retiring from international soccer.

“I’ve been considering it for a long time but after 15 years I decided to close an important and wonderful part of my soccer career,” Hamšík wrote on Facebook on Monday.

The 34-year-old playmaker made his international debut in a friendly against Poland in 2007. He has played a record of 135 international matches for his country and scored a record 26 goals.

Hamšík captained Slovakia to its only World Cup appearance at the 2010 tournament in South Africa, where the Slovaks eliminated defending champion Italy and reached the round of 16.

“It was a huge privilege to lead the national team as captain in more than 50 games,” Hamsik said.

With Hamšík, Slovakia also qualified for the 2016 and 2020 European Championships.

“He deserves our respect and admiration,” Slovakia national coach Štefan Tarkovič said. ”An era of Hamšík and (Martin) Škrtel is coming to an end.”

At the club level, Hamsik spent his best years in Napoli from 2007-19. He won the Turkish league with Trabzonspor this season.

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP-Sports