In May 2010, Elia was included in the preliminary squad for the FIFA World Cup in South Africa despite facing uncertainties over his injury that he sustained while at Hamburger SV. On 27 May 2010, Dutch manager Bert van Marwijk announced that Elia would be part of the 23-man final squad for the 2010 FIFA World Cup. Prior to the tournament, Elia caused controversy in the Dutch media when he tweeted "cancer Moroccan", prompting a ban of use of Twitter. This led Elia making an apology for his action. In the first match, he came on as a substitute in the 72nd minute and set up their second goal in a 2–0 win over Denmark, with his shot hitting the post and Dirk Kuyt tapping it in. Following this, Elia found his playing time, coming from the substitute throughout the tournament. He later said about the role, saying: "If I come in for five or ten minutes, then I do my very best and I want to show my good side. It's nice to fill in, because the boys also help you well." In the final, Elia was a 71st-minute substitute for Kuyt, as Netherlands finished runners-up to Spain.