 Barrera appeared in three matches at the 2010 FIFA World Cup for Mexico.Barrera made his debut in the second match against France, coming on in the 31st minute for an injured Carlos Vela.Barrera caused the second goal for Mexico when French defender Eric Abidal knocked him down in the penalty area and was given a penalty which Cuauhtémoc Blanco scored and Mexico ended up winning the match 2–0.