BUDAPEST (Reuters) - A Hungarian policeman was shot dead with a machine gun early on Wednesday when police tried to search the home of a 76-year-old man suspected of illegal possession of firearms, police and prosecutors said.

The policeman, 46, was shot in the head during the attack in Bony, near the western industrial hub of Gyor, police said. The assailant was wounded by police fire and was rushed off to a local hospital.

"As police entered the premises, the assailant, who was the subject of the investigation, used a firearm against police officers," prosecutor Imre Keresztes told a news conference.

"Based on current findings, the assailant fired 5 to 6 shots from a machine gun," he added.

Prosecutors gave no further information about the assailant. Regional news website kisalfold.hu said he was a member of a local far-right organization.

(Reporting by Gergely Szakacs; Editing by Tom Heneghan)