Bajo Pivljanin ( – 7 May 1685), born Dragojlo Nikolić (), was a Serbian hajduk commander mostly active in the Ottoman territories of Herzegovina and southern Dalmatia. Born in Piva, a Serbian Herzegovinian tribe, at the time part of the Ottoman Empire, he was an oxen trader who allegedly left his village after experiencing Ottoman injustice. Mentioned in 1654 as a brigand during the Venetian–Ottoman war, he entered the service of the Republic of Venice in 1656. The hajduks were used to protect Venetian Dalmatia. He remained a low-rank hajduk for the following decade, participating in some notable operations such as the raid on Trebinje. Between 1665 and 1668 he quickly rose through the ranks to the level of harambaša ("bandit leader"). After the war, which ended unfavourably for the Venetians, the hajduks were moved out of their haven in the Bay of Kotor under Ottoman pressure. Between 1671 and 1684 Pivljanin, along with other hajduks and their families, were refugees in Dalmatia. Upon renewed conflict, he was returned to the Bay of Kotor and placed in charge of defending the frontier; in 1685 he and his band fell in battle against the advancing Ottoman governor of Scutari. Regarded as one of the most distinguished hajduks of his time, he is praised in Serbian epic poetry.

Early life Dragojlo Nikolić, nicknamed Bajo Pivljanin, was born around 1630 in Piva (modern-day northwestern Montenegro), at that time part of the Ottoman Sanjak of Herzegovina. According to oral tradition he was born in the village of Rudinice (in Plužine), while there are two versions as to which family he belonged. According to one tradition, found in Kosta Radović's novel Vrtijeljka (1922), he was born in the village of Rudinice (now in Plužine) in Piva to his father Nikola and his mother Ruža, of the Ruđić brotherhood. Radović claims that he was born on 22 May 1622, while it is estimated that he was born in 1630. His godfather, the monk Ivanović, named him Dragojlo, while the nickname Bajo (derived from baja, "snake", a common nickname in Piva which was thought to protect children from evil) was given to him by his grandfather Simo. This version was also mentioned by Blagojević, who stated that Bajo Pivljanin belonged to the Nikolić family in Gornje Rudinice, descending from the old brotherhood of Ruđić. The Ruđić brotherhood from Rudinice, which later dispersed elsewhere, is one of two family trees in Piva from which many Pivan families descend.

According to the priest Toma Lješević (1897), Bajo was the son of Jovan Ivanović and a mother of the Tadić brotherhood; belonging to the Ivanović brotherhood in Donje Rudinice, in a place named after them. This family, as many other families in Piva, either left or was absorbed by other families. In the Ivanovići hamlet of Donje Rudinice, there was a kula (tower house) belonging to Pivljanin; this tower house, and the village church, were later destroyed by the Ottomans after his operations became well known. Pivljanin was an oxen trader, a common occupation in the 17th and 18th centuries, and often exported through Risan market, becoming quite wealthy.

According to the epic poem Sa šta Pivljanin Bajo ode u uskoke collected by Vuk Karadžić, written in the form of a confessional monologue of Pivljanin, he left Piva and became a hajduk (bandit) after he murdered Asan-aga Kopčić, an Ottoman leader in Drobnjaci who had assaulted him. With Limo "Limun" Srdanović from Drobnjaci, another trader whom he met at the start of the Cretan war, he led a band of 30 hajduks.

Cretan War

The hajduks, who were Ottoman subjects, were recruited by the Republic of Venice as guerilla forces to co-operate in the defence of the Venetian–Ottoman frontier in Dalmatia during the Cretan War (1645–69). They crossed into Venetian territory from which they conducted raids into Ottoman-controlled lands.

Pivljanin was first mentioned in 1654 as one of 1,500 hajduks operating from Venetian territory. During the Cretan War he mostly fought in the southern parts of Dalmatia and Herzegovina, where the population was predominantly anti-Ottoman. Pivljanin was a close friend and favourite of Serbian Orthodox metropolitan (bishop) Vasilije (Basil) Jovanović during the war. He is believed to have begun organizing his own band in ; according to an epic poem, Pivljanin, Cvjetko Vlastelinović and Đurko Kapetanović established a band which operated in Herzegovina.

The hajduk bands carried out one of their most successful operations in Herzegovina in March 1655, raiding Trebinje, taking many slaves and carrying away considerable loot. This raid was commanded by Terzić from Nikšić, and left Herzegovina through Cavtat (part of the Republic of Ragusa). The raids led to conflict between Ragusa and the Beys of Novi led by Omer-beg Begzadić, whose villages had suffered the most. In February 1656 the hajduk bands broke through Rijeka Dubrovačka into Herzegovina and returned with more loot. In the same year, Pivljanin began to work for the Venetians. After their defeat at Morača in 1649, and the building of the Kolašin fortress (1647–51) by the Ottomans, the Venetians brought offensive operations to a halt. From 1655 to 1657, the Ottomans made several attacks on the Venetian territory around Grbalj. The main hajduk centre became Perast in the Bay of Kotor, which they used as base to raid Ottoman territory. By 1658, the hajduks had mastered Herzegovina to the extent that they "forced taxes on all villages towards Gacko". Taxes were collected by groups of 10–12 hajduks, while disobedience was punished. Pivljanin and his hajduks also operated in Popovo and Romanija. Refugees from Ottoman Herzegovina were gladly accepted into the Republic of Venice. According to the historian Ljubo Mihić, the most distinguished of the hajduks in this period were Pivljanin and Stevo Popović.

Pivljanin rose quickly in the hajduk ranks; in 1664 and 1665 he was mentioned simply as "Bajo hajduk" in Ragusan documents, but by 1666 he was referred to as a "buljubaša" (captain), and by 1668 as a "viši (higher) harambaša" (bandit leader).

Pivljanin's tactics included quick raids and destroying bridges as he retreated. For example, the stone bridge on the Tara in Šiplje was destroyed after his band had raided Kolašin. In 1664, Pivljanin is mentioned as a hajduk commander active in the Republic of Ragusa. At the beginning of August 1664, hajduk leaders Stevo and Nikola Popović, Vukosav Puhalović, Pivljanin, Dijete, Čauš, and others, destroyed a merchant caravan on the border with Ragusa, and took 150 cargoes of very expensive goods; Armenian merchants, to whom the goods belonged, complained to the Doge of Venice. The Venetian government warned the hajduks against further provocations of the Ottomans, fearing new attacks from Sohrab Mehmed Pasha, the sanjak-bey of Herzegovina. In ca. 1665, Pivljanin suffered a great defeat by the Ottomans at the village of Grdijevići, losing most of his band and being forced to leave his home region. One hundred and fifty years later, rebels on the Tara used this event, among others, as justification for a revolt. At the beginning of May 1666, Pivljanin raided a Ragusan ship off the coast of Koločep that was bound for Venice with merchandise, unloading eight wagons of wax and freeing captured merchants, among whom were four Turks, in return for a high payment and a written statement that the wax and money had been given to him voluntarily. The Ragusans claimed that at the time of the raid, Pivljanin had shouted that the provveditore (district governor) of Venetian Dalmatia had given him the order to take all that he came across, both on the sea and the land. Five days later, Pivljanin raided a large and unusually rich caravan carrying Venetian merchandise through Ottoman territory. In September 1666, Pivljanin and Mato Njegošević attacked an Ottoman caravan in Mosko then retreated to Banjani.

On 25 March 1669, Pivljanin, living in Stoliv (near Kotor), was recorded in Kotor as having acknowledged a debt of 62.5 real (40 groschen being 1 real) to Gierolamo Cazalieri. In early April 1669 Pivljanin and Puhalović raised and looted in Herzegovina, and retreated towards Šipan. According to legend, he burnt down a mosque in Nevesinje, and another one in Počitelj. There are accounts recorded by the anthropologist Jevto Dedijer that several Muslim families left their homes after cruel treatment by Pivljanin; the Šehović left Korjenići and moved to south Herzegovina after he and Limun burnt down their house; the Kajtaz and Rorić left Nevesinje and moved to Mostar, and a large number of the families of Slivlja left their homes. The war ended with Ottoman victory in 1669, with Venice being forced to relinquish all of the territory taken over by the uskoks and hajduks during the war, with only Klis becoming a new Venetian possession. The Venetian–Ottoman border delineation act was signed on 30 October 1671.

Inter-war period After the war, the southeastern Venetian possessions (the Bay of Kotor) were destituted. War, hunger and frequent epidemics had decreased the population. As soon as the peace had been signed, the uskoks and hajduks became a nuisance to Venice; up until then frontiersmen defending Dalmatia and the Bay of Kotor from Ottoman invasion, they were now a potential cause to new conflicts with the Ottomans, which Venice wanted to avoid. The hajduks were accustomed to living on war booty, thus they had a hard time coping with peacetime. The provveditore generale Antonio Priuli, who was very favourable towards the frontiersmen, called uskok and hajduk leaders to Zadar to discuss ways to "create conditions for a normal life".

In December 1669 Antonio Priuli brought from Perast to Venice hajduk leaders including Bajo Pivljanin, Grujica Žeravica, Vukosav Puhalović and buljubaša Milošević. Earlier, in June, the Venetian provveditore issued the termination of duty of the "chiefs that protect the Kotor area", the first three mentioned, and had them included in the list of soldiers having the right of pay and bread. Pivljanin's bravery and sacrifice to the Republic of Venice is especially outlined. The four leaders asked the Doge if the hajduks could be granted Vrana in Ravni Kotari or Risan in the Bay of Kotor as a district for them to settle, and benefits already given to Paštrovići, Grbalj and Perast, due, among other issues, to the fact that "the number of hajduks that fled to the Perast area in 1654 had risen to 1,500, of whom 500 were militarily able, and now, in peacetime, their livelihood was under threat". The issue was finally settled after several months with the arrival of Antonio Barbaro as the new generale provveditore.