Tumour-agnostic drugs do not care where the cancer is growing in the body as long as it has a specific genetic abnormality inside.
UK doctors testing the drugs said they were “a really exciting thing”.
They said the approach had the potential to cure more patients and cut side-effects.
The drug that has been approved is called larotrectinib.
Charlotte Stevenson, a two-year-old from Belfast, was one of the first patients to benefit.
She was diagnosed with infantile fibrosarcoma, a cancer of the body’s connective tissue.
She has been treated with larotrectinib as part of a clinical trial at the Royal Marsden Sutton, in London, for the past year.
Her mum, Esther, said: “We knew that our options were limited [so] we decided to give it a try and are so glad that we did.
“We have been able to watch Charlotte develop and grow at a rapid rate, making up for lost time in so many ways and amazing us all with her energy and enthusiasm for life.
“She can now have a relatively normal life and, best of all, the drug has had an incredible impact on the tumour.”
Charlotte’s tumour was caused by a genetic abnormality known as an NTRK gene fusion.
One part of her DNA accidentally merged with another and the alteration in the blueprint for her body led to the growth of her cancer.
But NTRK gene fusions are not unique to sarcomas – they also appear in some brain, kidney, thyroid and other cancers.
“It is a really exciting thing, as is it works across a range of cancers. It’s not confined to one,” Dr Julia Chisholm, a children’s cancer consultant at the Royal Marsden Hospital said.
NTRK mutations are relatively rare, but other targeted therapies are in development.
It marks a move away from treating a “breast cancer” or “bowel cancer” or a “lung cancer” and towards precision medicine that takes advantage of the genetic make-up of each patient’s tumour.
Dr Chisholm said: “The beauty is it targets the abnormality.
“There are a number of biochemical pathways that are common in many different tumour types.
“I think this is the way things are going and this is about better outcomes, curing more patients and producing kinder treatments with reduced side-effects.”
The decision by European regulators does not mean it will be instantly available for patients in the UK.
But earlier this year, NHS England described tumour-agnostic drugs as a “revolutionary” and “exciting new breakthrough” in cancer and said preparations were under way to ensure patients were given access to them.
“The benefits for patients – in particular children – of being able to treat many different types of cancers with one drug is potentially huge, helping them to lead longer, healthier lives,” NHS England chief executive Simon Stevens said at the time.
Prof Charles Swanton, Cancer Research UK’s chief clinician, said the drugs were “exciting”.
He added: “The NHS will need to ensure the right genomic testing is available across the country to identify patients who could benefit so it’s good that the NHS is already thinking about how to get this to patients with cancer as soon as possible.”
Dr Brendon Gray, from Bayer, the drug company that developed larotrectinib, said: “As the first tumour-agnostic medicine approved in Europe, larotrectinib represents a real shift in cancer treatment.”