After federal border agents detained several Mexican immigrants in western New York in June, an article about the incident in a local newspaper drew an onslaught of vitriolic postings on its Web site. Some were racist. Others attacked farmers in the region, an apple-growing area east of Rochester, accusing them of harboring illegal workers. Still others made personal attacks about the reporter who wrote the article.

Most of the posts were made anonymously. But in reviewing the logs of its Internet server, the paper, The Wayne County Star in Wolcott, traced three of them to Internet protocol addresses at the Department of Homeland Security, which oversees border protection.

Homeland Security started an investigation into the posts this month, according to the reporter, Louise Hoffman-Broach, and Richard M. Healy, the Wayne County district attorney. A spokeswoman for the federal agency’s inspector general said she could neither confirm nor deny an investigation; department rules prohibit the use of office equipment for the personal transmission of material that could offend fellow employees or the public.

Coming on the eve of the apple harvest season, the Web posts and the investigation  first reported this week on The Star’s Web site  have ratcheted up longstanding tensions in Wayne County, where farmers and laborers have accused immigration officials of using heavy-handed tactics like racial profiling and arbitrary or unjustified detentions.