In 1842, Njegoš and Ali Pasha met at a Dubrovnik palace to negotiate peace. The two eventually reached an agreement, which was signed before representatives of Austria and Russia. As Njegoš and Ali Pasha emerged from the palace, Ali Pasha produced a bag full of gold coins and tossed them into the air, prompting the Montenegrin delegation—which included several chiefs—to scramble after as many as possible. Through this action, Ali Pasha effectively demonstrated Montenegro's poverty before the Austrians and Russians, embarrassing Njegoš in the process.