I had a strange experience on a night train from Vienna to Rome last June. Around Villach, Austria, a plainclothes Austrian border guard comes by, flashes a badge at me and wants to see my passport and visa. I show him my passport but tell him I have no visa since I am not required to have one. He looks very puzzled by what I tell him, takes my passport and tells me he will return. About 10 minutes pass and I am starting to worry that this was a scam and my passport was stolen. Then he abruptly returns, hands back my passport and simply says "It is okay". What was all that about? That has never happened in 20 years of train travel.
Random border checks do happen. I know people here who have been surprised by them. Although I must point out that it is still extremely rare. My guess - and it is purely speculation - is that they had received a tip about something illegal, and/or were searching for someone in particular. I would have been less surprised if you'd been searched going from Rome into Austria, as supposedly it's easier to get into Italy illegally, and then travel to other EU countries. It's been a concern expressed by the French.
It's worth noting that although the Schengen Treaty eliminated compulsory border checks, the national police are still authorized to make discretionary checks. I think the previous poster's explanation is probably correct.
Back in 2004 when my daughter and I were travelling at night by train from Salamanca to Toulouse, at some point over the French border at one of the stops, French Police boarded the train and did passport etc. checks. They just checked our passports on the spot. In fact two young travellers were removed from the train. In all our train travels since, I have never encountered this. I found the whole experience a bit disturbing.
Thanks for the replies. I have had my passport checked numerous times on the trains. But I have never encountered 1. A plain clothes officer 2. An officer who didn't know when a visa is required. 3. On a train headed out to the next
Travel is about new experiences. You had one. We had one on the train from Luxembourg City back to Germany or Belgium, I forgot which. We observed the conductor spending an inordinate amount of time with a well-dressed couple. What looked like a plain clothes cop stopped by and perused their identification. At the border the train stopped unexpectedly. We sat. The intercom said the train was having mechanical problems. About a half hour later we were notified we would have to get off the train and board on across the stance. As the crowd was leaving one train for the other a circle of cops surrounded the aforementioned couple and moved them away from the rest of the people. Not being nosey we have no idea what happened to them after that. The new train proceeded onward as if nothing had happened. A new travel experience. If you want a really new travel experience take the train from Istanbul to Bucuresti. Your passport will really get a workout there.
Obviously I stumbled into an international spy ring and was mistaken for a double secret agent, just like in an old film noir flick.
I believe it was in 2007/2008 (?) that compulsory passport checks were abolished in the EU. The last time going from Germany to Poland by train (in 2005) both sides checked/stamped at Kunowice (Kunersdorf) to and fro. But no more, whether by train or on foot such as crossing the Oder bridge in Frankfurt an der Oder. Crossing from Germany to France last summer my passport was checked since I had a rail Pass but within Germany upon presenting the Pass I was never asked to show the passport. But I have noticed that everytime I make a border crossing by train between Germany and France, they ask to see the passport, the ICE or TGV. Let them see that USA passport. @ Allen: Hard to say whether it was a scam in the making, esp. when he didn't know about the non-visa requirement for you, sounds fishy. I've always seen uniformed personnel do the checking and stamping/remove passengers (non-paying), etc.