Hamšík is a regular member of the Slovakia national team. He made his debut on 7 February 2007 in a friendly against Poland, which ended in a 2–2 draw. He played his second match against Germany in the UEFA Euro 2008 qualification, which Slovakia lost 2–1. He became the key member of the attack for the national team, usually playing as a left or central attacking midfielder. Hamšík captained his country in its first FIFA World Cup experience in South Africa in 2010, where the nation made it to the first knockout stage after defeating then-world champions Italy 3–2. Slovakia was defeated by later finalists Netherlands in the first knockout stage.