Diyarbakir, Turkey (CNN) -- At a campaign rally in the predominantly Kurdish city of Diyarbakir in southeastern Turkey, Turkish Prime Minister Recep Tayyip Erdogan tried Wednesday to draw parallels between the oppression and persecution Turkey's largest ethnic minority has faced and the pressure he himself faced under Turkey's former secularist leaders.

"We went through the same suffering as you," Erdogan told a crowd of thousands of people who gathered amid rain and tight security in they city's main square. "Your brother (Erdogan) was jailed for only reciting a poem. ... I know what the status quo made my Kurdish brothers live through. I come from within this struggle. I know policies of dismissal, I know denial."

Erdogan referred to the six months he spent in jail in the late 1990s when he was the mayor of Istanbul. Turkish authorities imprisoned him after he recited a poem that was ruled to have Islamist connotations.

In his speech on Wednesday, Erdogan emphasized "brotherhood" with the Kurdish people. For nearly 30 years, southeastern Turkey has been the primary battleground for a guerilla war between Kurdish separatists and the Turkish state that has claimed more than 30,000 mostly Kurdish lives.

"For decades we lived in poverty together. For decades, we lived the pressure, oppression, the fascist oppression of the status quo together. What was banned for you, was also banned for us," Erdogan said.

Security was tight ahead of Erdogan's speech. The Diyarbakir governor's office issued a written statement announcing security forces confiscated dozens of gasoline bombs as well as ingredients for Molotov cocktails during operations launched before the rally.

It said it had had information of "possible attacks on the security forces, political party election bureaus and party offices with Molotov cocktails, flared, and handmade bombs."

Tensions were raised by clashes that erupted Tuesday during an Erdogan rally in the Black Sea town of Hopa.

Diyarbakir has long been a hotbed of support for the Kurdish opposition activists, and intermittent clashes were reported there Wednesday, including one case in which the driver of a large van was pulled onto street after exchanging words with pedestrians.

People were subjected to thorough checks before going into the rally, although once inside the mood was jovial, with people praising Erdogan and some women writing notes and giving them to his bodyguards in the hope that they might be passed on to the prime minister.

But not far from the rally, in the Kurdish neighborhood of Baglar, almost all of the shops were closed in silent protest against Erdogan. Men on the streets sang political songs and waved flags in support of the Peace and Democracy Party, the main Kurdish political party.

Later in the evening Molotov cocktails and other homemade explosives were thrown at police gathered to contain the protests. Fires were quickly put out by heavily armored police trucks and minutes then passed before the next device was thrown.

No one was reported hurt in the incidents.

In the clashes Tuesday in Hopa, a demonstrator died of a heart attack and one of Erdogan's bodyguards was hospitalized with head wounds after demonstrators hurled stones that struck him as he was riding Erdogan's campaign bus away from Hopa.

The demonstrators in Hopa were for the most part members of leftist and secularist groups.

Parliamentary elections are to be held in Turkey on June 12. Erdogan's Justice and Development Party is widely expected to once again win a majority of seats in parliament. It first swept to power in 2002.