In Syria, music runs deeper into the fabric of the place than anywhere else in the world.

Long before the modern state was formed in 1946, Syria had developed rich musical traditions over thousands of years. The diverse religions, sects and ethnicities that inhabited and travelled across the country over the millennia – Muslims, Christians, Jews, Arabs, Assyrians, Armenians and Kurds, to name but a few – all contributed to this eclectic musical heritage.

Songs of ancient Syria

In the 1950s, archaeologists found 29 3,400-year-old clay tablets in a small cubicle – likely a library – in the ancient port city of Ugarit on Syria’s Mediterranean coast. They were mostly broken into tiny fragments, but one, which came to be known as H6, remained in larger pieces. Inscribed on it were lyrics, and underneath them is what researchers believe is the earliest example of musical notation anywhere in the world.

You may also be interested in:
• The world’s oldest centre of learning
• Where algebra was invented
• The dessert that’s blocked at borders

These shards of clay are the beginnings of an incomparable musical heritage.

Academics have spent years literally piecing together the tablets, trying to work out what was written on them, what it meant and how the musical notation might sound were it to be played again. The text is in Babylonian cuneiform script, a system of writing that spread throughout the region several millennia ago.

We could read the script... but we didn’t have any idea what it meant

“The problem with this tablet is that – we could read the script because it was written in Babylonian cuneiform, and we know the value of the signs – but we didn’t have any idea what it meant,” said Richard Dumbrill, professor of archaeomusicology at Babylon University in Iraq, who has worked on the Ugarit tablets for more than two decades.

Dumbrill described how he attempted on many occasions to reconstruct the Ugarit tablets in order to translate the text and music inscribed on them: “I took photographs and I tried to build them as a puzzle, but some had been damaged beyond reconstruction.”

The translation difficulties were a product of the text being written in a language known as Hurrian from the north-east Caucasus, probably in modern-day Armenia, but which ended up in Syria’s fertile lands.

“These people migrated towards north-west Syria – it took them a good couple of thousand years – and decided to use the Babylonian signs to write their text and their music,” Dumbrill said. “So it was extremely difficult to translate. However, I managed to find out that the text below the two lines were musical names that were Hurrianised – that is, they were Babylonian but had been transformed on contact with the Hurrian people. And I could find out that it was a melody. It took me about 20 years to translate.”

So what does the earliest musical composition tell us about the people who lived at that time? From Dumbrill’s translations, he believes they had catalogues of songs for occasions of all sorts and moods, not just hymns for religious events.

One song details a bar girl selling beer to her clients, but the tablet known as H6 details a more sober story.

“It’s about a young girl who cannot have any children; she thinks that the reason is because she misbehaved in some way, which is not mentioned,” Dumbrill said. “And from what we can understand of the text, which is quite limited, she goes at night to pray to the goddess Nigal, who was the goddess of the moon. She brings a little pot of tin with sesame seeds or sesame oil in it, which she offers to the goddess, and that’s all we know about the text.”

An ancient musical workshop

But Syria did not produce only the earliest melody. Over time, a rich array of musical instruments on which to play them also formed across the region, such as the lyre, a stringed musical instrument with a yoke and a crossbar, and lutes, which evolved into the modern Arabian oud, a teardrop-shaped plucked string instrument that produces one of the most evocative sounds in the region.

At Mari, an Early Bronze Age city-state on the banks of the Euphrates river in eastern modern-day Syria, researchers in the 20th Century uncovered a number of records detailing the musical instrument-making business of the time.

“There in the palace [at Mari] we discovered a huge number of tablets which were mainly letters and receipts of material from artisans who were requesting leather, raw hide, wood, gold and silver for making instruments,” Dumbrill said. “Therefore we have a very good idea about the instruments that were made about 4,000 years ago. We knew the names of the artisans, we knew the type of instruments they made. They were already influenced by instruments which were not Syrian,” he added, citing the Iranian parahshitum as an example, a type of lyre that became very popular among the girls of the harem at Mari.

Production of musical instruments continued to flourish in Syria over the centuries, and many are preserved in collections open to visitors today.

At the Debbané Palace in the Lebanese coastal city of Saida, for example, a collection of Ottoman-era musical instruments, dating from around the 19th Century, gives visitors an insight into the traditions present across both Lebanon and Syria before the formation of the modern states. Pieces from Syria include ouds and bouzouks (a small lute with a long, slim arm) inlaid with wood and ivory.

“People [visiting] ask, why are there so many musical instruments?” said Ghassan Dimassy, a guide at the Debbané Palace. “We tell them that this is an Ottoman house and the women used to sit and sing.” He mimicked the women playing a musical instrument and the men lying back and relaxing; here, music was the essential backdrop to any leisure occasion.

A music in exile

Last year, Syrian authorities launched a bid to have Aleppo, Syria’s second city, added to Unesco's Creative Cities Network as a ‘City of Music’ to commemorate its heritage. During the 17th Century, Aleppo was renowned for its muwashshah, a form of music combined with lyrics from Andalusian poetry, classical Arabic poetry, or, later on, Syrian or Egyptian conversational Arabic. Muwashshah are performed by a band playing the oud and qanun (a horizontal board with strings plucked to produce a haunting sound like trickling water), as well as the kamanja (a violin-like instrument), a darabukkah (drum), and a daf (tambourine). The form thrived in the city, where it was embraced by both Muslim and Christian populations.

However, significant efforts to preserve Syria’s musical traditions are now also found outside this country, which has entered its eighth year of conflict and where civilians have in large part been forced to focus attention on survival rather than exploring their cultural heritage. Some Syrian youth are making the best of a difficult situation and are bringing Syria's rich musical history into the limelight.

Long an incubator of creative talent, Beirut has become a crucible for preserving Syrian musical heritage. Me'zaf, an organisation founded in the Lebanese capital in 2015, aims to innovate, promote and preserve authentic music from not just Syria, but the Levantine region as a whole, showing how the Middle East’s rich musical traditions precede the modern nation-state borders introduced in the 20th Century.

“A lot of forms were created in Damascus or Aleppo and were taken to Cairo, then forms were created in Cairo and performed in the Levant,” explained Ghassan Sahhab, a Me'zaf leader and Lebanese musicology teacher, composer and qanun player. “We have a rich culture and we have to appreciate it and know our history in order to continue. At the moment, it’s a case of preserving heritage and culture.”

Another musical troupe that formed in Beirut is Assa'aleek, which consists of five Syrians and a Norwegian. The band’s name means ‘the ragamuffins’ or ‘the vagabonds’ in Arabic, and refers to a group of self-proclaimed Robin Hood-type characters who lived during the pre-Islamic era in the Arabian Gulf and tried to change the ways of the ruling class.

“We are similar to the Assa'aleek: we were forced out of our communities and homeland for many reasons,” said Abodi Jatal, percussion player in Assa'aleek.

“It is important to preserve ancient Syrian music because this is our identity, it is history and it is civilisation, after all. This is what we have. This is what we are,” said Assa'aleek vocalist Mona Al Merstany. “It’s not just about a normal country – it’s one of the most ancient countries. It is important to show such things because all people have the right to see beauty.”

It is important to preserve ancient Syrian music because this is our identity

They see music as a way of fighting the injustices faced on a daily basis by people in the region.

“Our lyrics and songs, this is what they are built on,” Jatal said. “We wanted to fight against bad habits, such as harassment against women, and we saw that this is really similar to what the Assa'aleek did, so that’s why we used the name.”

As well as new songs, the band has been performing Syrian folk music since 2013, bringing music from across Syria’s diverse landscapes and communities to audiences in Lebanon.

Syrian music heritage has come a long way since the melody found on the clay tablets at Ugarit. Today, bands such as Assa'aleek are reinventing the definition of Syrian music, bringing it to new audiences.

Meanwhile, they are developing the sounds that museoarchaeologists of the future might one day find, stored on computers, in files or drawers, in Aleppo, Damascus or Beirut, or even Paris, London or Berlin.

Al Merstany sums it up well: “When someone asks me what is Syria, this is what I have to say: the music, the art.”

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Travel, Capital, Culture, Earth and Future, delivered to your inbox every Friday.