"I send my condolences and sincere compassion and affection to all of the families who have lost loved ones. I share their pain. Their grieving is my grieving," King Felipe said.
Spain honoured its COVID-19 victims and those who stood on the frontline during the pandemic with a ceremony on Thursday.
The 35-minute-long event in Madrid was presided over by the royal couple.
In an address, King Felipe VI sent his condolences to all those who have lost loved ones because of the virus.
"I share their pain. Their grieving is my grieving," he said.
He also paid tribute to the deceased, in particular the elderly who "wrote the history of Spain, and built our country into a fine democracy", and younger victims "who had a bright future ahead of them".
"This crisis has put us to the test but I think it has also demonstrated how many of us were able to show courage and dedication to others even when our own lives were at risk," he added.
The monarch said the country owes a "moral debt to all those who helped us" and called for the Spanish people to "remain united" and "draw on our knowledge, courage and commitment so that we can move forward with hope."
"We must do this out of respect for those who are gone," he said.
The brother of a journalist who died from the virus and a nurse from Barcelona also spoke.
Some 500 guests attended the ceremony including those who were most impacted by the pandemic — such as patients and relatives of victims — as well as representatives from civil society and essential workers.
Government ministers and top officials from each of the country's regions were also present. They were joined by Ursula von der Leyen, Charles Michel, and David Sassoli, respectively heads of the EU Commission, Council and Parliament.
They laid white roses to honour the victims and the ceremony was concluded with a minute of silence.
Spain is the third most-heavily impacted country in the EU, after Italy and France, and the seventh-worst-affected globally.
According to a tally kept by Johns Hopkins University, 28,413 people have lost their lives to COVID-19 in the country since the beginning of the outbreak.