Todd Heisler/The New York Times

Nina Bernstein has an article on the front page today about American Border Patrol agents who board trains running completely within the United States looking for undocumented immigrants. Here is her first-person experience on such a train in upstate New York. If you’ve had an encounter with the Border Patrol, let us know in the comment box below.

Traveling from New York City to Buffalo on Amtrak’s Lake Shore Limited last month, I wondered what I would say if Border Patrol agents showed up on the train at Syracuse or Rochester and asked, “Are you a U.S. citizen?”

My plan was to politely decline to answer, and see what happened next.

After all, the train was not crossing an international frontier. At the train stations and bus depots in western New York where such citizenship checks began on a small scale in 2006 and are now a little-publicized but regular feature of domestic travel, the Canadian border is far away, in the middle of Lake Ontario.

The Border Patrol said it had jurisdiction to enforce immigration laws within 100 miles of the border. But it also said that its agents’ questions were a part of “consensual, nonintrusive conversation.” In theory, that means that people are free to refuse to answer and walk away. One goal of my reporting trip was to see for myself, and for readers of The New York Times, how such conversations played out in practice.

Thousands of passengers have been taken to detention because they answered that they were not United States citizens, and then could not show immigration documents that satisfied the agents. Other passengers simply declared American citizenship and stayed in their seats. The inland transportation checks have increased as the number of agents deployed in the region has grown sixfold since 9/11.

Joanne Macri, director of the Criminal Defense Immigration Project of the New York State Defenders Association, who frequently travels by bus or train between Albany and Buffalo, told me she had never seen anyone refuse to answer in the many encounters she had witnessed.

Once, Ms. Macri said, an agent prevented her from handing her organization’s card to two Latino men he was taking from the train, and asked her if she knew what obstruction of justice was. Another time, at 1 a.m. on a Trailways bus in Rochester, a young man who showed agents a driver’s license was questioned about what hospital he had been born in, and then taken off the bus for further inquiries before eventually being allowed to reboard and travel on to Buffalo.

Ms. Macri has always answered the agents, “even though I know everybody has a right to remain silent,” she said.

“It’s 1 o’clock in the morning,” she said, “and reality sets in: Do I really want to be kicked off the bus?”

It was 4:20 a.m. by the time my train limped in to the Buffalo-Depew station, more than four hours late — too late for the Border Patrol, it appeared. But by 9 a.m., when a train on the return journey pulled into the same station, half a dozen men in green uniforms with pistols on their hips strode down the platform toward me and a family that included two women wearing saris.

An agent with a shaved head and sunglasses stopped beside me. “Are you a U.S. citizen?” he asked.

“I don’t want to answer that question,” I replied.

“Fine,” he said, and promptly turned to the family — two children, their parents and grandmother.

Unlike me, a white woman in jeans who had spoken American English with no accent, they looked and sounded like immigrants. If they said they were citizens, would they be asked for identification? If they refused to answer, as I had, would the agent just move on? Or, as upstate immigration lawyers maintained, would the agent take their silence as a justification for further inquiry?

I would never know, because the father readily replied that they were all legal permanent residents of the United States from India. He handed over all their Indian passports as soon as the agent asked for them.

A minute or two later, on the Rochester-bound train, I caught up with the same agent just as Ruth Fernandez, a naturalized citizen born in Ecuador, was giving him her United States passport. These days she feels obliged to carry it whenever she visits her sister in Ohio, she told me later.

“Checking people, I see every time,” she added in imperfect English, as her grandchild slept beside her. “I don’t like it. Not supposed to.” In Spanish, she added: “He said it was because of terrorism that they do this. I think it’s for the immigrants.”

Overhearing her complaint, another passenger, Katie Miller, objected, praising the officer for his politeness. “He wasn’t threatening anybody,” she said. With so many television reports of children being kidnapped, and the Canadian border nearby, she added, the presence of the patrol made her feel safer.

But Ms. Miller’s father, Fred Linxweiler, was not so sure. “What I worry about is how he picked her,” he said, referring to the agent’s decision to ask Ms. Fernandez for identification. “It’s O.K. if it’s really random. Otherwise, it’s going to look like this new Arizona law.”

Most passengers answered the agents readily. Others, startled from sleep, simply stared, and the agents prompted them: “State your citizenship for me, please, sir. What country were you born in?”

Some had been on the train overnight, since Chicago; many had boarded at dawn. Their features reflected ancestry from every continent: a stout black grandmother in a Brooklyn T-shirt. A graybeard wearing a yarmulke. A pale young man lost in his iPod, who said later: “I’m clueless. I don’t pay attention to news and politics. Aren’t they doing that in Arizona or something?”

By then, after a stop scheduled for five minutes had turned into 15 or 20, the agents had left the train. Other passengers, too, turned out to have Arizona on their minds, including Joe Hedger, 37, a blond graduate student in philosophy who was moving to Syracuse from Tempe with his wife and 2-year-old son.

“We’ve had Sheriff Arpaio doing this for a while,” he said, referring to Sheriff Joe Arpaio of Maricopa County, who patrols metropolitan Phoenix and administers the jails, “just pulling people over and asking if they’re citizens, and if they’re not, just carting them away, I guess. I was really surprised that this was happening in New York.”

He added, “It’s just like they’re authority figures, so you answer.”

Sheldon and Pam Cole of New Canaan, N.Y., who had promptly replied “both U.S. citizens” when the agent asked, also had second thoughts about the exchange.

“I am a U.S. citizen, but I could have been a German who spoke good English,” said Mr. Cole, 65, whose gray ponytail could be seen under his baseball cap. “It didn’t make a whole bunch of sense. It bothers me, because in America we’ve never been expected to carry around and produce proof of citizenship on demand.”

Without such a document requirement, he added, “It’s virtual racial profiling.”

But a couple from Norfolk, N.Y., Charlie and Sheree Frego, strongly disagreed. “They’ve got a good eye,” Mr. Frego, 51, said of the Border Patrol, citing his years of living near the Canadian border. “They can tell by your response.”

The Fregos had encountered the patrol before on buses near the border, they said. Once, at Watertown, on a bus that stops near a prison, they said, they saw agents take an African-American man off for extra screening. “I thought they did the right thing,” Mr. Frego said, adding, “He got back on the bus after 20 minutes.”

My conversations were interrupted by an Amtrak conductor who insisted that I needed written permission from the company’s media relations department to interview the passengers. I disagreed, citing the First Amendment and my ticket to Rochester.

“Are you a passenger or a reporter?” the conductor demanded.

“Both,” I said, and went back to work.

Much later, I called Cliff Cole, a spokesman for Amtrak, seeking a clarification of the railroad’s role in the patrol checks.

“Amtrak does not delay the train,” Mr. Cole said. “It’s a Border Patrol initiative with which Amtrak has been cooperative and will continue to be cooperative.”

“It’s a security measure,” he added. “They come on the train to do what they have to do — just like you would have air marshals on an airplane.”

As for my asking fellow passengers about the experience, he said, “Amtrak’s media relations policy is if you want to conduct a story and interview our passengers on a train, it must be done with prior permission.”

He did not respond to complaints from immigrant advocates that the company gives no prior notice of the requests for documents made on the Lake Shore Limited, though it warns passengers on its international routes. Others have contended that illegal immigrants should not expect a warning that they are risking apprehension when they travel.

The same issues swirled around the bus station in Rochester two days after my train trip, when agents emerged from waiting vans and boarded the Boston-to-Cleveland bus. I asked the dispatcher if I could get on to observe.

“It’s up to you, but be careful,” he said. “They don’t like traffic once they’re started asking questions — they’re nice guys, but they can get kind of ornery.”

The empty aisle seat I chose turned out to be a problem.

“Move out of the way, please,” an agent told me, gesturing at the young Latino in the window seat. “I need to get this gentleman off the bus.”

I complied, as the agent asked in Spanish if the man had found his missing papers. He had not.

As the agents hurried him off the bus and into a van, I followed, calling out to ask his name. He tried to answer, but the words were lost as the bus behind us pulled away.

Other passengers had been taken off another bus early that morning, I learned — a Bangladeshi family of four, including a woman and her son, a minor. If these apprehensions had been criminal arrests, I could have quickly learned names, ages, charges and where those arrested were being held. But no such transparency exists in these cases.

Rafael LeMaitre, a spokesman for Customs and Border Protection in Washington, said privacy law did not allow the agency to say anything about the young man, or to confirm the family relationship of the Bangladeshis. Eventually, in response to repeated inquiries, he said the young man was Mexican, accused of returning to the United States illegally after accepting “voluntary departure,” and had probably been taken to detention in Batavia, N.Y. — though he could have been transferred anywhere in the country.

By then, I had traveled south from Rochester on the Lake Shore Limited, missing the patrol’s reappearance at Buffalo-Depew, according to a train attendant, Hamat Kumar, who described an unusually large contingent this time — 17 agents, including a dozen trainees.

“They always get on in Buffalo,” said Mr. Kumar, 30, a naturalized citizen born in India. “There’s nothing I can do about it.”

“If I say no,” he added with a laugh, “they take me, too!”