An undercover nurse who carried out secret filming to reveal the neglect of elderly patients on a hospital ward was found guilty of misconduct today.

The Nursing and Midwifery Council ruled that Margaret Haywood, 58, had prioritised the filming of the BBC Panorama programme and not fulfilled her obligations as a nurse.

The Undercover Nurse programme, screened in July 2005, showed poor conditions at the Royal Sussex Hospital in Brighton.

But chair of the panel, Linda Read, said that Ms Haywood "suspended her obligations ... to protect and support the health of individual patients" by making the film.

She said: "She followed the behest of the filmmakers ... rather than her obligations as a nurse.

"There was a conflict of interests here and the registrant followed her role as a person engaged by the Panorama programme rather than her duties as a nurse.

"She says she was justified in carrying out the filming and breaching patient confidentiality because of the awful conditions on the ward.

"The panel is sensible to the fact that there may be instances where disclosure of confidential information may be essential to protect a patient from significant harm.

"The panel has concluded that, for it to be essential for the registrant to breach confidential information, she must first have exhausted all other avenues of addressing the inadequacies on the ward."

Yesterday, the tribunal, in central London, heard from the producer of the programme, Elizabeth Bloor, who told the panel that "there was an overarching public interest" in the broadcast.

Ms Bloor said she felt urged to make the hospitals documentary because Panorama had received 4,000-5,000 complaints about conditions.

Ms Haywood, of Liverpool, agreed to work on the programme and began nursing shifts at the Royal Sussex Hospital.

"When Margie went to work at this hospital, she was clear from the minute she walked in that there was a problem," Ms Bloor said.

Ms Haywood has admitted breaching patient confidentiality.

The panel will reconvene tomorrow to decide on possible sanctions.