(CNN) — Before Azerbaijan was famous for oil, it was a land of silk and spices.
At the crossroads of Europe and Asia, bordered by the Caspian Sea and the Caucasus Mountains, it was an important thoroughfare on the Silk Road, the ancient web of trade routes linking East and West.
By the 19th century, Sheki, on the Silk Road path through northwest Azerbaijan, was an international center for silk production.
Today, it's one of Azerbaijan's most picturesque towns, filled with cobbled streets and medieval architecture: a fresh, bucolic retreat from the more arid south.
Caravanserai roadside inns
High in the Caucasus Mountains, shielded from the world by forest-covered mountains, passing traders and their goods-laden animals would stop here on their way to Tbilisi or Baku and overnight at one of the town's five caravanserai.
These roadside inns were once dotted all along the Silk Roads, and today's travelers to Azerbaijan -- there were a record 2.7 million international tourists in 2017 -- can rest their head in an authentic 18th-century caravanserai, the Yukhari Karavansaray Hotel.
Sheki is a mountainous retreat in northern Azerbaijan.
A mini fortress halfway up M.F. Axundov Street in Sheki's Old Town, entry to the hotel is through an imposing original wood doorway.
Inside is a twin-level arcade of arches around a peaceful central courtyard in which traders' camels were once tied, but which is now dotted with trees and seating spots.
The guest rooms are on the first floor and while undeniably spartan -- the furnishings and media facilities may well date back to the country's Soviet area -- with prices starting at just 30 Manats (about $18) a night, it's a small price to pay for an authentic historical experience.
The rooms' arched brickwork ceilings and small windows mean there's no need for air conditioning in summer, though winters can reportedly get a little cold.
There are more luxurious accommodation options in town for those who choose to stay elsewhere but still pay a visit to the caravanserai.
Day trippers can explore the courtyard between noon and 7 p.m., but overnight guests have the place to themselves come morning and evening.
There's a large garden restaurant out back as well as an atmospheric stone-walled tea house.
The Palace of Sheki Khans
A few steps up the hill is Sheki's top tourist attraction, the summer palace of the Sheki Khans, who ruled this corner of the Caucasus between 1743 and 1819.
Built in the late 18th century, this two-story building has a breathtakingly ornate interior and exterior.
Russian wood, French strained glass, Ottoman ceramics and Iranian mirrorwork all went into the construction of this pleasingly picture-perfect and symmetrical masterpiece.
The facade is covered in large part by a mosaic of multicolored glass set in a wooden lattice, called a shebeke, constructed without nails or glue. Examples of shebeke artistry can be found throughout Sheki.
Inside, its six rooms are entirely covered with elaborate frescoes depicting flowers, fauna, battles and hunting scenes.
The Russian invasion of the early 19th century may have put an end to the khanate but the painstakingly crafted palace and the peaceful gardens beyond have survived intact to delight visitors for generations since.
English-speaking tours can be arranged in advance.
The Museum of Folk and Applied Arts has a small collection of historical artefacts.
As befits the cosmopolitan nature of this trading town, Sheki has a long history of religious diversity, with many churches and mosques in the region.
A few kilometers north of town, the Church of Kish -- completed in the first century CE and used most recently as a Caucasian Albanian church -- is one of the country's oldest.
There are souvenir shops lining Sheki's main streets selling ceramics, samovars and scarves made of the town's signature product: silk.
Locals head to Aliahmed Sweets to buy their halva and other treats.
Piti, a chunky meat stew eaten with bread, is the local specialty, while halva -- the sticky treat made from sugar and nuts -- is perfected at Aliahmed Sweets.
Out of town, the roads that once served as Silk Road routes are still busy with traders.
While Soviet-born Zhiguli cars buzz by alongside more modern vehicles, roadside vendors sell tandir bread, where the dough is slapped straight onto the side of a clay oven, and qutab -- light-as-air dough griddled with greens and seasoned with sumac.
Hungry travelers stop at the roadside to eat and drink freshly made tea at makeshift tables under shade-giving trees.
With Azerbaijan introducing new easy three-day visas in 2017, this path through the Caucasus is as lively as ever.
Yukhari Karavansaray Hotel, M.F. Axundov street 85, Sheki AZ5500, Azerbaijan; + 994 55 7555570
Palace of Sheki Khans, Sheki 0055, Azerbaijan; +994 55 619 75 88
Aliahmed Sweets, 122 Mirzə Fətəli Axundov küçəsi, Sheki, Azerbaijan; +994 55 842 42 42