It’s almost like one of those "walk-into-a-bar" jokes: a politician, a journalist and an army general walk into a Lok Sabha constituency.

Media coverage of the Ghaziabad elections has been dominated by the three famous names on offer: the Bharatiya Janata Party’s General VK Singh, a former army chief; the Congress' Raj Babbar, a film star; and the Aam Aadmi Party’s Shazia Ilmi, a former journalist. Or, to put it in headline parlance, Ilmi, filmy and fauji. The punchline, however, might end up featuring an elephant — the election symbol of the Bahujan Samaj Party.

“You know how it is with [BSP chief] Mayawati,” said Ramlal, a shopkeeper sitting in the shade of the Ghaziabad’s Delhi Gate. “She’s not bothered with TV channels, she knows it can even backfire on her to get a lot of publicity. Instead, she has got her candidate and the workers to quietly make their way throughout the area…when the votes are counted, only then you will see the haathi [elephant] on television.”

By most accounts, the five-pronged contest in the constituency – including the Samajwadi Party, in addition to the already crowded field – has come down to a two-horse race between the BJP and the BSP, with the demographic complexity of the seat remaining the caveat.

Carved out of Western Uttar Pradesh’s Hapur constituency in 2008 as part of the delimitation exercise, Ghaziabad includes both urban settlements – like Indirapuram and Vaishali whose residents see themselves as part of Delhi – as well as rural areas like Loni.

In 2009, BJP party president Rajnath Singh won the seat by a margin of 90,000 votes, aided by his party’s alliance with the Rashtriya Lok Dal. The subsequent state elections in 2012, however, shocked both the BJP and the SP – then right in the throes of the Akhilesh Yadav wave – as the BSP ended up winning four of the five assembly seats, including Ghaziabad City.

Worried that his national role had left the impression that he had neglected Ghaziabad, Rajnath Singh had for some time been looking for another constituency for these elections. He finally settled on former prime minister Atal Bihari Vajpayee’s old seat in Lucknow. In his stead, the BJP is running with the controversial former army chief VK Singh, who fully integrated his military demeanour into his new-found party’s nationalistic outlook while campaigning.

“You can’t blame Rajnathji for the lack of development here in Ghaziabad,” Singh said in a media interaction on the last day of campaigning. “He proposed Rs 650 crore worth of projects, but the United Progressive Alliance government never allowed anything to go through.”

What if the same happens if he becomes MP for Ghaziabad, without his own party ruling at the Centre? “Look, you know me, you know my approach,” said the former army chief, who took his own government to court while in office. “A path always opens up. I will find a way.”

Across town, the Congress’ Raj Babbar is one of the few film star-turned-netas who seems comfortable in his role, having burnished his credentials by famously beating Dimple Yadav, the daughter-in-law of SP supremo Mulayam Singh Yadav, in Firozabad in 2009. But like VK Singh, Babbar is an outsider, as is AAP’s Shazia Ilmi, who would have preferred to fight from New Delhi instead.

Then there’s SP’s Sudhan Rawat, who will hope to take the Muslim votes in a constituency that has about 4.5 lakh residents from the community, but will also be battling disenchantment with UP Chief Minister Akhilesh Yadav’s regime in the aftermath of the Muzaffarnagar riots last year.

"It's hard to say which way the Muslims will vote, and we can be quite sure they won't all vote together," said a local journalist. "The ones out in the urban areas might think of AAP or even Congress, while the rural ones will be picking between SP and the Mayawati's persistent campaigning."

Which leaves the Brahmin candidate from the BSP, Mukul Upadhyay, who boasts about his sister-in-law having won an earlier election, and claims AAP has a negligible presence in the area and is confident that he has got his caste calculation just right to ensure the former army chief doesn’t run away with the prize. “The BJP may get a lion’s share of the Thakur vote in which I may get less,” Upadhyay told The Economic Times. “[But] people from the Vaishya community who used to be earlier with the BJP are with me this time.”

Put together with Dalits, Brahmins and any Muslims who can be convinced to stay away from the SP because of Muzaffarnagar, and the BSP might end up with a winning combination only months after the party’s gains in Delhi were washed away by AAP. Amidst the Ilmi, filmy, fauji battle, it might just be the haathi carrying out the coup.