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, 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.