Halmaj, with its 1,800 residents, is a small grid of streets lined with one-story homes with peaked, red-tile roofs beside the narrow trickle of the Barsonyos River. It lies just out of sight of the main highway connecting dour, industrial Miskolc, Hungary’s third-largest city, with the nearby Slovak border. Passing motorists hardly know it is there.

Yet in many ways, Halmaj is representative of the forces at work in the poor, rural parts of Hungary under Mr. Orban’s tenure.

There is the struggling economy, the endemic unemployment that the government combats with public works projects, and the desire to assimilate poor villagers into a life of working for a paycheck.

But not least, there is also the yearning for a Hungarian identity in a country where many residents feel it is under threat from immigrants, emigration and a creeping, Pan-European lifestyle that softens the edges of their national identity. Mr. Orban has made this nationalistic yearning the cornerstone of his appeal.

“We are losing touch with our past, we are losing touch with everything,” complained Mr. Toth, a member of the Fidesz party. “But now, I think, people understand that it is important, and they are collecting old family photographs and pieces of the past, before it disappears.”

He walked over and ran his hands along the ornate, wooden fence surrounding an old churchyard, freshly built by city workers using a traditional design. “A country that loses touch with its past has lost its soul,” Mr. Toth said.