The registration of domain names is governed by national and/or international legislation (depending on the type of domain) and does not fall under the remit of the Spanish Patent and Trademark Office. Conflicts that may arise in relation to trademarks and domain names must be submitted to the International Arbitration Bodies or to the Courts.
General information on this issue (taken from the website of the Intellectual Property Registry):
HOW ARE CONFLICTS REGARDING INTELLECTUAL PROPERTY RIGHTS, CORPORATE NAMES AND DOMAIN NAMES RESOLVED?
The temporal priority of the corresponding sign is of significance:
A) Trademark or trade name prior in time: the registration holder can bring actions before the Courts of Justice against those parties who have subsequently adopted the same name or another name that could be confused with it as a corporate name for identical or similar commercial activities, requesting, among other measures, that the defendant company cease to use the distinctive sign in question and the modification of its company name. Furthermore, the registration bodies responsible for the granting or verification of names of incorporated entities shall reject the name or corporate name requested if it coincides or may lead to confusion with a notorious or well-known trademark or trade name in the terms established under the Trademark Act, unless authorised by the trademark or trade name holder (Fourteenth Additional Provision of the Trademark Act).
Against those who use that distinctive sign as a domain name, together with the possibility of going to the Courts of Justice (section. 34.3.e. Trademark Act), it is possible to use the administrative procedures of verification and cancellation before Red.es, if the domain name in question falls within any of the circumstances stipulated as cause for such action.
B) Prior company name: A company that has correctly registered its corporate name may oppose, through administrative channels, all attempts by a third party to register its corporate name as a trademark or trade name if the requirements established in section 9.1.d. of the Trademark Act are met, and may also go to the Courts of Justice to request the nullity of said registration. Such companies may also defend their rights against those parties who register their company name as a domain name in the terms described under A) above.
C) Prior domain name: Those who have their domain name properly registered may file a claim in the Courts of Justices against those parties who register that name as a trademark, trade name or corporate name, invoking the legislation on unfair competition, the existence of bad faith (section 51.1.b of the Trademark Act) and any other grounds on which its rights are based. This type of legal action is especially difficult.