The hosts had already beaten Primera Divsión opposition in the last 32 but could not repeat the feat as they lost to a Messi-inspired Barcelona.
Rayo were looking to make the quarter-final stage of the competition for the first time in twenty years but they rarely threatened in the tie.
Barca had the lion's share of chances and almost went ahead in the 20th minute but Frenkie De Jong couldn't turn home Junior Firpo's cross and hit the bar.
The woodwork was struck again 15 minutes later after Dimitrievski made a smart save from Trincao's shot. The rebound then came to Riqui Puig whose shot was deflected onto the post.
Messi was back from a two-game suspension after he was sent off for his antics in the Spanish Super Cup final and the Argentine hit the woodwork for the third time when his free-kick came off the top of the bar.
Not long after Rayo were ahead completely against the run of play. Álvaro used his lighting pace down the right and his cross was tapped in by the substitute, Fran García, after it was parried by Neto.
Koeman sensed an upset so brought on Pedri, Dembélé and Alba and they were level within a matter of minutes when Messi converted De Jong's cross.
Koeman's earlier changes reaped their rewards when some good link-up play between Messi and Alba resulted in the latter finding De Jong who netted to take Barcelona into the next round.
January 27, 2021