The 19th-seeded Cilic, who reached the fourth round at the Australian Open, is a former top-10 player. But he had 67 unforced errors in the match and was broken five times.
Ramirez Hidalgo earned only his fourth win in 15 Grand Slam tournaments. Besides reaching the fourth round at the 2006 French Open, the Spaniard lost in the first round in each of his other 13 appearances at tennis' four biggest tournaments.