France and Italy have also each reported findings from wastewater treatment plants from before the first official cases were known.
Researchers say that detecting the virus even just one month before it was officially discovered could have vastly improved the response to the pandemic.
"We found traces of the virus in a single sample from March 2019 and then never again until 2020," said Albert Bosch, the university's research leader.
"The virus concentration in the sample was at the same level as samples from March and April 2020. Maybe it wasn't detected at the time because it was flu season and nobody was looking for it."
Both symptomatic and asymptomatic carriers of COVID-19 shed the virus in their feces, making sewage surveillance a powerful tool for monitoring the spread of the disease throughout the community.
The study analyzed samples from two wastewater treatment plants in Barcelona from 13 April, approximately the epidemic's peak, to 25 May. They also tested frozen archival samples from as far back as January 2018.
The researchers first found the virus was present in Barcelona on 15 January 2020, 41 days before the first case was officially reported in the city.
Then they ran tests on samples taken between January 2018 and December 2019 and found the presence of the virus genome in one of them, collected on 12 March 2019, nine months before the virus was first discovered in China.
Spain's health ministry is yet to comment on the findings, but Joan Ramon Villalbi from the country's Society for Public Health and Sanitary Administration said the research was "definitely interesting" and that it "was suggestive."
However, he added it is still too early to draw any definitive conclusions and that more testing is needed.
"When it's just one result, you always want more data, more studies, more samples to confirm it and rule out a laboratory error or a methodological problem," said Villalbi.
According to the researchers, one way to back up the findings would be to examine blood samples from influenza patients admitted to Barcelona hospitals in March 2019 to see if they were infected with COVID-19 but misdiagnosed.
The researchers believe the findings could have been replicated around the globe.
"Barcelona is a business and commerce hub, as well as a popular venue for massive events, gathering visitors from many parts of the world. It is nevertheless likely that similar situations may have occurred in several other parts of the world, with circulation of unnoticed COVID-19 cases in the community," said the report.
Check out The Pandemic Playbook, CGTN Europe's major investigation into the lessons learnt from COVID-19.