Spanish newspaper Expansion earlier reported that the banks were considering a merger to create Spain’s sixth-largest lender by assets, with almost 96 billion euros ($109 billion).
The banks confirmed in separate statements to the Spanish market regulator that they had been in contact as part of their regular analysis of potential transactions.
Unicaja said no decision had been taken, while Liberbank said no specific proposal had been submitted to its management.
Shares in both banks gained around 15 percent by 1530 GMT.
Mediobanca is advising Unicaja and Deutsche Bank is working with Liberbank, a source familiar with the matter said.
Both Mediobanca and Deutsche Bank declined to comment on the Expansion report.
($1 = 0.8835 euros)
Reporting by Joanna Jonczyk-Gwizdala in Gdynia, Valentina Za in Milan and Isla Binnie in Madrid; Editing by Alexander Smith and David Evans
Our Standards: The Thomson Reuters Trust Principles.