Prince Joachim, 28, who is a nephew of Belgium's King Philippe, attended a social event with the family of a Spanish female friend, his lawyer's office confirmed to CNN on Monday.
"I would like to apologize for travelling and not having respected the quarantine measures," the prince said in a statement released by the Córdoba law office of Mariano Aguayo.
"I did not intend to offend or disrespect anyone in these very difficult times and deeply regret my actions and accept the consequences."
The prince had traveled from Belgium to Spain on May 24 and attended a social gathering with "12 or 27 guests" on May 26, the palace press office said. He tested positive for Covid-19 two days later.
Under Spain's state of emergency, travelers arriving in the country, with a few exceptions, are required to go into quarantine for two weeks.
In addition, gatherings of more than 15 people who don't live together are not currently permitted under the confinement rules in place in Córdoba.
Authorities are now investigating whether the social event the prince attended had more than 15 people in attendance, the spokeswoman for Rafaela Valenzuela, the Spanish government's chief representative in Córdoba, told CNN Monday.
The spokeswoman added that regional health authorities had informed the Spanish government that there may have been up to 27 people at the event.
Police in Spain have the power to fine individuals who break confinement rules. Amounts vary across the country but several hundred thousand fines have been issued since the state of emergency began on March 14.
But a spokeswoman for the prince's law office told CNN there were two social events on consecutive days last week at which the prince met with the family of a female friend. Neither event was attended by more than 15 people, she added.
The prince is now in isolation with mild coronavirus symptoms, the spokeswoman said.
Prince Joachim is the third child of Princess Astrid, the younger sister of King Philippe.
Spain has been one of the European countries hit hardest by Covid-19, with more than 239,000 confirmed cases and more than 27,000 deaths, according to data from Johns Hopkins University.
As the infection rate has declined, the government has slowly eased confinement restrictions, while focusing on early detection through increased testing and contract tracing to quickly stamp out any new outbreaks.