Before the 19th century, the presence of Orthodox Serbs in the city of Ragusa/Dubrovnik was minute because the Republic of Ragusa enforced a single state religion of Roman Catholicism. Orthodoxy was given equal status with Catholicism in 1848, by which time there were hundreds of Orthodox immigrants from Herzegovina in the city who maintained their religious affiliation with the Serbian Orthodox Church. The Eparch of Dalmatia Josif Rajačić dispatched the first Orthodox priest to Dubrovnik, Đorđe Nikolajević, in 1833.
The cultural and political movement of Serbs in Dubrovnik was started around this time, notably by Nikolajević's 1838 article in the newspaper Srbsko-Dalmatinski Magazin (published in Zadar by Božidar Petranović), where he claimed the entire Ragusan Slavonic literary corpus for Serbian literature. In 1841, Medo Pucić, a writer from an old Catholic noble family, became acquainted with pan-Slavists Ján Kollár and Pavel Jozef Šafárik, and started to espouse a Serb national sentiment. Matija Ban, another Catholic from Dubrovnik, was influenced by pan-Slavists and romantic nationalists Michał Czajkowski and František Zach in Istanbul, so much that he moved to Belgrade in 1844 in an attempt to promote his idea that Serbian patriotism must extend beyond Serbian Orthodoxy and the borders of the Principality of Serbia. In Serbia, Ban's group of enthusiasts worked with Serbia's minister of the interior Ilija Garašanin, the author of Načertanije, to enter the upper reaches of Serbian political life. They were not, however, met with uniform acceptance - Jovan Sterija Popović and others, with support of the Church in Serbia, protested against their ideas and by extension against Vuk Karadžić's notion that Serbian language and nationality extended beyond Orthodoxy.
During the Revolutions of 1848 in the Habsburg areas (1848-1849), the Serbian government was involved on the side of the South Slavs in Serbian Vojvodina, and at the same time Matija Ban traveled to Croatian lands and advocated for pan-Slavic as well as pro-Serbian ideas, claiming the Kingdom of Dalmatia should be unified with the Kingdom of Croatia-Slavonia, but also describing the language of Dubrovnik as Serbian. By 1850, the revolution was over and Ban, particularly because he had acquired Serbian citizenship in 1844, became suspicious to the Austrian police in Dubrovnik, who started to monitor him. At that point, he was summoned to Belgrade where Garašanin suspended all of his operations and ordered him to permanently return to Belgrade. He hesitated, but was persuaded by Prince Aleksandar and others to comply. He did however leave his family in Dubrovnik and published two more issues of the journal Dubrovnik in Ljudevit Gaj's publishing house in Zagreb in 1851 and 1852.
Three decades later, in the 1880s a sizable group of Ragusan intellectuals independently developed a Serb-Catholic feeling, but at that point it was a political movement that was openly hostile to the Croats and whose leaders cooperated with the pro-Italian Autonomist Party (i.e. it was not pan-Slavic).
Following the 1878 Congress of Berlin, the Habsburg Empire occupied Bosnia and created the Austro-Hungarian Condominium of Bosnia and Herzegovina, which prompted a confrontation between the Serb and Croat national ideologies, and the new "Serb-Catholic" circle of Dubrovnik increasingly broke with the pan-Slavic tradition of its founders, Pucić and Ban. The same year, Serbia obtained independence.