With its chrome counter and cherry pie, the diner is an icon of American culture. What's the global appeal of this humble eatery, asks the BBC's Stephen Smith.

Sitting in a diner, on the inside looking outside.

This is a quintessential American experience. Add a booth, a Formica counter and a cup of joe - as diner patrons call their coffee.

Themed restaurants and burger chains from Mumbai to Manchester aim to replicate this chrome-flashed experience, and diner fare such as home fries and fluffy pancakes are now global fast food staples.

So why are these kerbside kitchens a landmark of US culture?

The first such establishment opened in 1872 in Providence, Rhode Island - a "night lunch wagon" to serve those who worked and played long after the restaurants had shut at 20:00.

Its mix of open-all-hours eating and cheap, homemade food proved a hit, and the formula has been repeated ever since.

Today the diner occupies a place in the American heartland. The closest British approximation is not a retro-chic replica diner where hip patrons eat gourmet burgers, but the local pub.

Just as dignitaries visiting the UK and Ireland are taken for a pint and a photo call, no US election campaign is complete without a stop at a diner to emphasise the candidate's everyman or everywoman credentials.

Image caption Common touch: The diner is now a compulsory stop on the campaign trail

"The thing about this democratic counter is that anyone can go in and sit down. It can be a professor, it can be a worker," says Richard Gutman, author of American Diner Then and Now.

Media playback is unsupported on your device Media caption Suzanne Vega in the eaterie that inspired Tom's Diner

"A friend of mine in Pennsylvania ate in a diner and he's in the middle of two guys. One is the chief of police and the other is just some character. The policeman looks over and says, 'Didn't I arrest you last year?' and the guy says, 'Yes you did - pass the ketchup.'"

Gutman has reclaimed 80 abandoned luncheonettes, and his memorabilia now occupies 4,000 sq ft (372 sq m) of a catering college near his home in Rhode Island.

"I was first interested in diners because of their architecture and their vernacular nature," he says.

If you ever get up this way, that cherry pie is worth a stop FBI Special Agent Dale Cooper in Twin Peaks How to make your own cherry pie

"They were built by Italian tile-setters and marble-workers, by German sheet metal workers, and French-Canadian carpenters. It was a melting pot of these different cultures to produce a building that is uniquely American."

His favourite working cafeteria, the Modern Diner in Rhode Island, is the first such establishment to be preserved for posterity on the National Register of Historic Places.

Its graceful lines had been cribbed from the railroad dining car. In fact, the all-American origins of the diner go back even further than that, to the chuck wagon which fed cowboys on the range.

From films such as Pulp Fiction and When Harry Met Sally, to books by John Updike, Jack Kerouac and Vladimir Nabokov, and the paintings of Norman Rockwell and Edward Hopper, the diner plays an important part.

"In the movies the diner is a special kind of space, a mythic place, a zone of escape," says film critic John Patterson.

Image caption Together alone: Edward Hopper's Nighthawks

Barry Levinson's Oscar-nominated film Diner was based on his experiences of growing up in the 1950s. "Say you were on a date and happened to ride by the diner - you'd see whose cars were there and you'd drop off your date and head inside because it would be a much more interesting night," Levinson recalls.

In cult TV series Twin Peaks, FBI agent Dale Cooper takes time out from investigating the murder of Laura Palmer with cherry pie and "damn fine coffee" at the Double R Diner.

While the diner acts as neutral territory for Al Pacino's cop to confront Robert De Niro's robber in Heat, in LA Confidential and A History of Violence it is used as the setting for brutal murders.

This contrast between the "placid, calm" diner and murder and mayhem makes the violence that much more shocking, says Patterson.

A cup of joe US colloquialism for coffee

Origin unknown, says the OED

First recorded use in Jack Smiley's 1941 book Hash House Lingo on the slang of roadside diners

Other diner lingo included "dog soup" for water and "sea dust" for salt

For singer Suzanne Vega, who had a worldwide hit with Tom's Diner, a different juxtaposition appeals.

"The attraction of the diner is that it's a sort of a midway point between the street and home," says Vega, who wrote the song in her local diner, Tom's Restaurant in Manhattan.

With lyrics such as "I'm feeling someone watching me, there's a woman on the outside looking inside" she paints a picture of New Yorkers separated by the thickness of a diner window.

Image caption The retro diner formula is slavishly copied in the UK

This recalls artist Edward Hopper's most famous work, Nighthawks - four people in a 24-hour restaurant, all alone together over their nightcaps.

Paradoxically, the diner is about loneliness and isolation as well as down-home hospitality.

Its enigmatic charm has helped it to resist fierce competition from fast food chains. But fans of the wayside canteen can't be complacent. They would do well to reflect on the poignant question that you hear asked over the counter of every diner: "Do you want that to go?"

Additional reporting by Megan Lane

America on a Plate: The Story of the Diner is on BBC Four on Tuesday 29 November at 2100 GMT, followed by Barry Levinson's film Diner at 2200 GMT.