The attorney general, Dominic Grieve, has intervened in the debate over so-called secret arrests and said police should confirm the name of a suspect if they have been correctly identified by the media.

Grieve, who is the government's principal legal adviser, said police would be "providing public reassurance" if they confirmed the identity of arrested suspects whose names had already been published.

He also told ITV News that it may be in the public interest for police to explain whom had been arrested to prevent misinformed speculation on social networking sites such as Twitter.

"Clearly, if the press [has] got to know who somebody is who has been arrested and are publicising that, then clearly it might be very sensible for the police to confirm that fact," Grieve told the UK editor of ITV News, Lucy Manning.

"But equally, I don't think we should end up with a process in which the police are being subjected to fishing expeditions with dozens of names being reeled out to them and an obligation to pick one of them."

Grieve is the latest senior political figure to line up against secret arrests, after the home secretary told police forces "there will be circumstances in which the public interest means an arrested suspect should be named". Guidance drawn up by the Association of Chief Police Officers (Acpo) cautions forces against confirming the details of an arrested individual when journalists have gathered the name from other sources.

Asked whether police forces should name arrested suspects in cases where the wrong person was being identified on social networks or in the media, Grieve said it was a "balancing exercise" and cautioned against introducing prescriptive rules. He added: "But under certain circumstances that might be a good reason why the person under arrest should have their name publicised."

Andy Trotter, chief constable of British Transport police and Acpo's media chief, told ITV News that it may be "perfectly proper" to publicise the name of suspects if police are attempting to encourage more potential victims or witnesses to come forward. But he added that each individual case needs careful consideration and suspects should not be identified "willy nilly".