The UK, unlike the US, has a strict "first to file" rule. This means that if party A files for a trade mark that party B has been using, but has never registered, party A will normally secure the mark, and once registration is complete, can compel party B to stop using it. That assumes that the application is otherwise valid, of course.
The page "Understanding United Kingdom Trademark Law" from Gerben a law firm, states:
The United Kingdom grants trademark rights to the first business or individual to file a trademark application. While you may have some rights to your mark simply by using it in the UK, those common law rights are very limited and may be challenging to prove in court. First-to-file countries, like the United Kingdom, often experience higher rates of bad faith registrations. These occur when a person with ill intent files for trademark registration with the intent to ransom the mark of its rightful owner at a much higher price. Because of this, it is wise to consider filing your mark with the UK Intellectual Property Office as soon as possible.
It is important to note that in the United Kingdom, it is possible for a person to obtain registration for a mark, even if a similar mark exists. During the registration process, an examiner at the IPO will review the trademark application and notify owners of similar [registered] marks of its status. Those owners, then, may choose to ignore the notification, allowing the new mark to obtain registered status, or to file an opposition with the IPO. These oppositions, however, can be both costly and time-consuming. Therefore, it is wise to complete a comprehensive trademark search prior to filing with the IPO, to ensure that a similar mark has not already been registered in the UK.
The Wikipedia article "United Kingdom trade mark law" states (citations omitted):
A registered trade mark is relatively simple to defend in a court of law. An unregistered trade mark relies on the law of passing off (where one party's goods or services are presented in a way that causes confusion between them and the goods or services of another party).
The Trade Marks Act 1994 states that "a person infringes a registered trade mark if he uses in the course of trade a sign which is identical with the trade mark in relation to goods or services which are identical with those for which it is registered". A person may also infringe a registered trade mark where the sign is similar and the goods or services are similar to those for which the mark is registered and there is a likelihood of confusion on the part of the public as a result.
The official UK government page "Trade marks: detailed information" collects links to many other official pages witjh information about trade mark law in the UK, One of these, "Earlier rights: fact sheet" describes the legal situation if one party has applied for a trademark, and a different party has claimed rights to earlier use of the mark. This page states:
When we search an application, we look for earlier filed marks that may be considered confusingly similar to your mark, that operate in a similar area of goods and services to yourself.
We will search for:
- UK trade marks (UK)
*international trade marks protected in the UK (WO)
We will highlight any potential conflicting marks in your examination report. Please note you will have two months to consider how you wish to proceed.
The Registry takes into consideration your mark as a whole and the goods and/or services being applied for. In the event of earlier marks found to be similar or identical to your application we will raise them in the examination report.
Trade marks are often registered for a wider range of goods and services than the proprietor trades in. Please note the registry does not search individual companies to determine how they are using their registered mark.
If we publish your trade mark, we will only notify holders of Domestic UK trade marks and International Registrations designating the UK.
When your mark is published in the Trade Marks Journal, the owners of any UK, or international marks protected in the UK (marks which start with the prefix (WO), will be notified.
Any third party can object to your trade mark, including those not notified. Please note, if you receive a notice of threatened opposition the onus is on you to contact the earlier right holder to try and negotiate or reach an agreement before the end of the opposition period.
Note that only holders of actual current UK trademarks, or parties who have already stated the application process are notified by the UKIPO.
Trade Marks Act 1994 Section 6 provides in relevant part:
(1) In this Act an “earlier trade mark” means—
(1)(a) a registered trade mark or international trade mark (UK) which has a date of application for registration earlier than that of the trade mark in question, taking account (where appropriate) of the priorities claimed in respect of the trade marks,
(1)(aa) a comparable trade mark (EU) or a trade mark registered pursuant to an application made under paragraph 25 of Schedule 2A which has a valid claim to seniority of an earlier registered trade mark or protected international trade mark (UK) even where the earlier trade mark has been surrendered or its registration has expired;
(1)(ab) a comparable trade mark (IR) or a trade mark registered pursuant to an application made under paragraph 28, 29 or 33 of Schedule 2B which has a valid claim to seniority of an earlier registered trade mark or protected international trade mark (UK) even where the earlier trade mark has been surrendered or its registration has expired;]
(1) (ba) a registered trade mark or international trade mark (UK) which—
(1)(ba)(i) prior to IP completion day has been converted from a European Union trade mark or international trade mark (EC) which itself had a valid claim to seniority of an earlier registered trade mark or protected international trade mark (UK) even where the earlier trade mark has been surrendered or its registration has expired, and
(1)(ba)(ii)accordingly has the same claim to seniority, or
(1)(c) a trade mark which, at the date of application for registration of the trade mark in question or (where appropriate) of the priority claimed in respect of the application, was entitled to protection under the Paris Convention or the WTO agreement as a well known trade mark.
(1A) In subsection (1), “protected international trade mark (UK)” has the same meaning as in the Trade Marks (International Registration) Order 2008.
(2) References in this Act to an earlier trade mark include a trade mark in respect of which an application for registration has been made and which, if registered, would be an earlier trade mark by virtue of subsection (1)(a), subject to its being so registered (taking account of subsection (2C))].
(2A) References in this Act to an earlier trade mark include a trade mark in respect of which an application for registration has been made pursuant to paragraph 25 of Schedule 2A and which if registered would be an earlier trade mark by virtue of subsection (1)(aa), subject to its being so registered.]
As I read this, only marks actually registered (through some process), or for which an application has previously been filed, count as “earlier trade mark”.
However, section 5 of the Act provides that:
5 Relative grounds for refusal of registration.
(1) A trade mark shall not be registered if it is identical with an earlier trade mark and the goods or services for which the trade mark is applied for are identical with the goods or services for which the earlier trade mark is protected.
(2) A trade mark shall not be registered if because—
(2)(a) it is identical with an earlier trade mark and is to be registered for goods or services similar to those for which the earlier trade mark is protected, or
(2)(b) it is similar to an earlier trade mark and is to be registered for goods or services identical with or similar to those for which the earlier trade mark is protected,
there exists a likelihood of confusion on the part of the public, which includes the likelihood of association with the earlier trade mark.
(3) A trade mark which—
(3)(a) is identical with or similar to an earlier trade mark,
shall not be registered if, or to the extent that, the earlier trade mark has a reputation in the United Kingdom and the use of the later mark without due cause would take unfair advantage of, or be detrimental to, the distinctive character or the repute of the earlier trade mark.
(3A) Subsection (3) applies irrespective of whether the goods and services for which the trade mark is to be registered are identical with, similar to or not similar to those for which the earlier trade mark is protected.
(4) A trade mark shall not be registered if, or to the extent that, its use in the United Kingdom is liable to be prevented—
(4)(a) by virtue of any rule of law (in particular, the law of passing off) protecting an unregistered trade mark or other sign used in the course of trade, where the condition in subsection (4A) is met,
(4)(b) by virtue of an earlier right other than those referred to in subsections (1) to (3) or paragraph (a) [F7or (aa)] above, in particular by virtue of the law of copyright or the law relating to industrial property rights.
A person thus entitled to prevent the use of a trade mark is referred to in this Act as the proprietor of an “earlier right” in relation to the trade mark.
(4A) The condition mentioned in subsection (4)(a) is that the rights to the unregistered trade mark or other sign were acquired prior to the date of application for registration of the trade mark or date of the priority claimed for that application.
Subsection 5(4)(a) along with 5(4a) doe seem to give the owner of "n unregistered trade mark", if it was in existence before the application was filed, a right to prevent the registration. This seems to contradict the othe sources. An applicant would be wise to consult a lawyer with experiene in UK trade mark practice in such a situation..